mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.time.epoch: fix issue in documentation
std.time.epoch.DaySeconds.getHoursIntoDay said that hours goes from 0-11. should be 0-23.
This commit is contained in:
parent
58f669dc8c
commit
1fa5a1959d
1 changed files with 1 additions and 1 deletions
|
|
@ -154,7 +154,7 @@ pub const EpochDay = struct {
|
|||
pub const DaySeconds = struct {
|
||||
secs: u17, // max is 24*60*60 = 86400
|
||||
|
||||
/// the number of hours past the start of the day (0 to 11)
|
||||
/// the number of hours past the start of the day (0 to 23)
|
||||
pub fn getHoursIntoDay(self: DaySeconds) u5 {
|
||||
return @intCast(u5, @divTrunc(self.secs, 3600));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue