(date time.Time)
| 72 | } |
| 73 | |
| 74 | func (dl *DateLabel) SetDate(date time.Time) error { |
| 75 | if date == dl.date { |
| 76 | return nil |
| 77 | } |
| 78 | |
| 79 | old := dl.date |
| 80 | |
| 81 | dl.date = date |
| 82 | |
| 83 | if _, err := dl.updateText(); err != nil { |
| 84 | dl.date = old |
| 85 | return err |
| 86 | } |
| 87 | |
| 88 | dl.dateChangedPublisher.Publish() |
| 89 | |
| 90 | return nil |
| 91 | } |
| 92 | |
| 93 | func (dl *DateLabel) Format() string { |
| 94 | return dl.format |
no test coverage detected