aboutsummaryrefslogtreecommitdiffstats
path: root/modules/util
diff options
context:
space:
mode:
Diffstat (limited to 'modules/util')
-rw-r--r--modules/util/time_stamp.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/util/time_stamp.go b/modules/util/time_stamp.go
index a03560b24f..56f41882f5 100644
--- a/modules/util/time_stamp.go
+++ b/modules/util/time_stamp.go
@@ -59,3 +59,8 @@ func (ts TimeStamp) FormatLong() string {
func (ts TimeStamp) FormatShort() string {
return ts.Format("Jan 02, 2006")
}
+
+// IsZero is zero time
+func (ts TimeStamp) IsZero() bool {
+ return ts.AsTime().IsZero()
+}