authorgravatar for samhattangady@gmail.comSamarth Hattangady <samhattangady@gmail.com> 2021-12-16 19:36:20+05:30
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-12-16 19:08:58-08:00
log1fa5a1959ddfdea98a1bd809e953daf42deb53f9
tree6413ed68c31cd7e8a55a33c2464130beee8f45e3
parent58f669dc8c4fa9f78d73d014e805a506009f3d30

std.time.epoch: fix issue in documentation

std.time.epoch.DaySeconds.getHoursIntoDay said that hours goes from 0-11. should be 0-23.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/time/epoch.zig+1-1
......@@ -154,7 +154,7 @@ pub const EpochDay = struct {
154154pub const DaySeconds = struct {
155155 secs: u17, // max is 24*60*60 = 86400
156156
157 /// the number of hours past the start of the day (0 to 11)
157 /// the number of hours past the start of the day (0 to 23)
158158 pub fn getHoursIntoDay(self: DaySeconds) u5 {
159159 return @intCast(u5, @divTrunc(self.secs, 3600));
160160 }