in reply to Re: weekday from dayofyear
in thread weekday from dayofyear

Time::Local is buggy when you use it to do time/date arithmetic. The maintainer refused to apply a simple harmless fix for the bug. I think this line was added to the docs instead:

If you supply data which is not valid (month 27, second 1,000) the results will be unpredictable (so don't do that).

He told me that Time::Local isn't to be used for date/time arithmetic. _nocheck doesn't relax the need for valid inputs. The fourth argument needs to be a valid day for the specified month and year. If it's not allowed with _nocheck, it's not allowed without.

Replies are listed 'Best First'.
Re^3: weekday from dayofyear
by DStaal (Chaplain) on Jan 02, 2009 at 20:26 UTC

    Which is what made me nervous. Just a few lines above that though he also gave an example which I basically just copy-and-pasted into here...

    On the one hand, everything in it is core, and according to the docs it should work. On the other, according to those same docs it may not be reliable. Depending on the situation, I might consider using it. (Where consider == test thoroughly.)