File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,8 @@ func (ts TimeStamp) FormatLong() string {
59
59
func (ts TimeStamp ) FormatShort () string {
60
60
return ts .Format ("Jan 02, 2006" )
61
61
}
62
+
63
+ // IsZero is zero time
64
+ func (ts TimeStamp ) IsZero () bool {
65
+ return ts .AsTime ().IsZero ()
66
+ }
Original file line number Diff line number Diff line change 26
26
<div class="activity meta">
27
27
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.AddedUnix.FormatShort}}</span></i>
28
28
-
29
- <i>{{if .ExpiredUnix}}{{$.i18n.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
29
+ <i>{{if not .ExpiredUnix.IsZero }}{{$.i18n.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
30
30
</div>
31
31
</div>
32
32
</div>
You can’t perform that action at this time.
0 commit comments