X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=current%2Flib%2FHTML%2FCalendarMonth%2FDateTool%2FDateCalc.pm;h=90612f6f2cc476200c98404a0b7be334d4ef8b65;hb=9d8d5103edda5befbcae635c8a6edebe7431e094;hp=97db69135b85ea27cd0a2580636c38a809f4de32;hpb=7444dbb3f0999e61ca02028e688a97577040eafb;p=deb_pkgs%2Flibhtml-calendarmonth-perl.git diff --git a/current/lib/HTML/CalendarMonth/DateTool/DateCalc.pm b/current/lib/HTML/CalendarMonth/DateTool/DateCalc.pm index 97db691..90612f6 100644 --- a/current/lib/HTML/CalendarMonth/DateTool/DateCalc.pm +++ b/current/lib/HTML/CalendarMonth/DateTool/DateCalc.pm @@ -9,7 +9,7 @@ use vars qw(@ISA $VERSION); @ISA = qw(HTML::CalendarMonth::DateTool); -$VERSION = '0.01'; +$VERSION = '0.03'; use Date::Calc qw(Days_in_Month Day_of_Week Add_Delta_Days Weeks_in_Year Week_of_Year Week_Number Mktime @@ -45,7 +45,7 @@ sub dow { sub add_days { my($self, $delta, $day, $month, $year) = @_; - $delta || croak "Delta (in days) required.\n"; + defined $delta || croak "Delta (in days) required.\n"; $day || croak "Day required.\n"; $month ||= $self->month; $year ||= $self->year; @@ -58,7 +58,8 @@ sub week_of_year { $day || croak "Day required.\n"; $month ||= $self->month; $year ||= $self->year; - my($week, $year) = Week_of_Year($year, $month, $day); + my $week; + ($week, $year) = Week_of_Year($year, $month, $day); ($year, $week); }