TruncateToHour truncates a time to the start of its hour.
(t time.Time)
| 55 | |
| 56 | // TruncateToHour truncates a time to the start of its hour. |
| 57 | func TruncateToHour(t time.Time) time.Time { |
| 58 | return t.Truncate(time.Hour) |
| 59 | } |
| 60 | |
| 61 | // TruncateToWeek truncates a time to the start of its week (Monday 00:00:00 UTC). |
| 62 | func TruncateToWeek(t time.Time) time.Time { |
no outgoing calls