Debian Codegraph @

docs/content/en/methods/time/IsZero.md

raw
1 ---
2 title: IsZero
3 description: Reports whether the given time.Time value represents the zero time instant, January 1, year 1, 00:00:00 UTC.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: bool
9 signatures: [TIME.IsZero]
10 ---
11
12 ````go-html-template
13 {{ $t1 := time.AsTime "2023-01-01T00:00:00-08:00" }}
14 {{ $t2 := time.AsTime "0001-01-01T00:00:00-00:00" }}
15
16 {{ $t1.IsZero }} → false
17 {{ $t2.IsZero }} → true
18 ```