in reply to weekday from dayofyear
I'll assume you know the year as well... (Otherwise you can't: It is indeterminate.) Time::Local and localtime together can get it for you:
use Time::Local 'timelocal_nocheck'; (undef,undef,undef,undef,undef,undef,$wday,undef,undef) = localtime(ti +melocal_nocheck(0,0,0,$day_of_year,0,$year));
(If I'm reading the docs right, that should work. It's not quite explicitly stated.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: weekday from dayofyear
by ikegami (Patriarch) on Jan 02, 2009 at 20:11 UTC | |
by DStaal (Chaplain) on Jan 02, 2009 at 20:26 UTC |