Time

YearDay

返回给定 time.Time 值在一年中的第几天:平年为 [1, 365],闰年为 [1, 366]。

签名
TIME.YearDay
返回类型
int
{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
{{ $t.YearDay }} → 27