1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Don't display calendar until() time if in the past

This commit is contained in:
Chris Cummer
2018-04-03 16:33:26 -07:00
committed by Chris Cummer
parent 12e6b2a9f2
commit faa4a915c4
2 changed files with 14 additions and 1 deletions

View File

@@ -117,6 +117,10 @@ func (widget *Widget) until(start time.Time) string {
duration = duration.Round(time.Minute)
if duration < 0 {
return ""
}
days := duration / (24 * time.Hour)
duration -= days * (24 * time.Hour)