in reply to Re: date and time
in thread date and time

Hi Stegalex
The edition I have erroneously states that the range for $yday is 1-366 (but it's really 1-365)

My book shows $yday as having a range from 0-365, which gives $yday an effective max of 366. This makes sense; there are 366 days in a leap year, so the range of $yday has to be effectively 366.

I think that the range for $sec is also wrong (0-60 vs 0-59)

Just as we can have leap days, we can have leap seconds- though they generally get less press. ("What? You were born on a leap second? That means you have a birthday, what... every time some standards organization wants you to have one?!"). Or, couched in the slightly less facetious tones of Cookbook: The values for second range from 0-60 to account for leap seconds, you never know when a spare second will leap into existence at the urging of various standards bodies.

blyman