Examples Filter
Hour returns the hour within the day specified by t, in the range [0, 23].
Minute returns the minute offset within the hour specified by t, in the range [0, 59].
Second returns the second offset within the minute specified by t, in the range [0, 59].
A common requirement in programs is getting the number of seconds, milliseconds, or nanoseconds since the Unix epoch. Here’s how to do it in Go.
Last Run  :
2012-11-01 22:08:41 +0000 UTC
0000-01-01 20:41:00 +0000 UTC
parsing time "8:41PM" as "Mon Jan _2 15:04:05 2006": cannot parse "8:41PM" as "Mon"
Nanosecond returns the nanosecond offset within the second specified by t, in the range [0, 999999999].
Last Run  :
876
Hours returns the duration as a floating point number of hours.
Last Run  :
I've got 4.5 hours of work left.
Minutes returns the duration as a floating point number of minutes.
Last Run  :
The movie is 90 minutes long.
Seconds returns the duration as a floating point number of seconds.
Last Run  :
Take off in t-90 seconds.
Last Run  :
90000 millseconds.
Last Run  :
90000000 microseconds.
Nanoseconds returns the duration as an integer nanosecond count.
YearDay returns the day of the year specified by t, in the range [1,365] for non-leap years, and [1,366] in leap years.
Day returns the day of the month specified by t.