MCPcopy
hub / github.com/lxn/walk / SetDate

Method SetDate

datelabel.go:74–91  ·  view source on GitHub ↗
(date time.Time)

Source from the content-addressed store, hash-verified

72}
73
74func (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
93func (dl *DateLabel) Format() string {
94 return dl.format

Callers 1

NewDateLabelFunction · 0.45

Calls 2

updateTextMethod · 0.95
PublishMethod · 0.45

Tested by

no test coverage detected