Hi Josh,
>
> Hi Ron,
>
> I'm a bit confused by your parameters to day_of_week().
>
> This is the actual implementation from DateTime.pm
>
> sub day_of_week { $_[0]->{local_c}{day_of_week} }
>
> -J
>
I compute the number of days in the current year
I figure out the day of week for january the first
and if this is (365 days in the year and "Sunday" or 7 in datetime) or
("Saturday"
6 in datetime or "Sun and a leap year) then I return 53 sundays as the
number of sundays
else I return 52 as the number of sundays.
I checked the docs for datetime and used them
F:\scripts>perldoc DateTime|grep day_of_week
File STDIN:
$dow = $dt->day_of_week; # 1-7 (Monday is 1) - also dow, wday
"_0". So for example, this class provides both "day_of_week()" and
"day_of_week_0()" methods.
The "day_of_week_0()" method still treats Monday as the first day of the
* day_of_week, wday, dow
Am I missing something?
Thanks
Ron Hill