7 ms·
How many seconds in an hour? Most of the time, 3600, occasionally 3601, and very rarely 3599. Hours in a day? Mostly 24, but 23 once a year ad 25 once a year.
by randomswede 4y ago
How many seconds in an hour? Most of the time, 3600, occasionally 3601, and very rarely 3599. Hours in a day? Mostly 24, but 23 once a year ad 25 once a year.
These all seem like good reasons to make then functions (taking a timestamp as a n argument) rather than mostly-correct constants.
I swear, the more I learn about calendars and timekeeping, the more I realise I never ever want to deal with it.
- euroderf 4y agoTell the reader that this here code is prepared for leap years, leap seconds, leap hours: SecondsPerStandardHour = 3600 // or NormalHour or TypicalHour HoursPerStandardDay = 24 // or NormalDay, TypicalDay