package HTML::CalendarMonth::DateTool;
-BEGIN {
- $HTML::CalendarMonth::DateTool::VERSION = '1.25';
+{
+ $HTML::CalendarMonth::DateTool::VERSION = '1.26';
}
# Base class for determining what date calculation package to use.
my $self = shift;
my @tools;
if (my $c = $self->datetool) {
+ eval "use $c";
+ die "invalid date tool $c : $@" if $@;
@tools = $c->_name;
}
else {
}
return $dc if $dc;
if (@tools == 1) {
- croak "invalid date tool " . join(': ', @{$fails[0]}) if @tools == 1;
+ croak "invalid date tool " . join(': ', @{$fails[0]});
}
else {
croak join("\n",
return "not installed" unless $self->_datemanip_present;
return "historic mode prior to 1752/09 not supported"
if $self->historic && $self->_is_julian;
+ eval { require Date::Manip && Date::Manip::Date_Init() };
+ return "init failure: $@" if $@;
return;
}
sub _ncal_present { shift->_ncal_cmd }
sub _cal_present { shift->_cal_cmd };
+
1;
__END__
For a given day, and optionally C<month> and C<year> if they are
different from those specified in C<new()>, provide the day of week
-number. (1=Sunday, 7=Saturday).
+number. (0=Sunday, 6=Saturday).
=item add_days($days, $delta, $day, [$month], [$year])