# NOTE: Derived from web_diary_dir/lib/DateTime/Date.pm.
# Changes made here will be lost when autosplit again.
# See AutoSplit.pm.
package DateTime::Date;

#line 545 "web_diary_dir/lib/DateTime/Date.pm (autosplit into web_diary_dir/lib/auto/DateTime/Date/DaysMonth.al)"
################################################################


sub DaysMonth ($;$)
{
    my $self = shift;
    my ($y, $m);

    if (ref $self){      # $dt->DaysMonth;
	$y = $self->year;
	$m = $self->month;
    } else {             # DaysMonth($year, $month);
	$y = $self;
	$m = shift;
    }
	
    if ($m == 2 && (($y%4==0 && $y%100) || ($y%400==0))){  # leap year
	return 29;
    } else {
	return $Days_Month[$m];
    }
}

# end of DateTime::Date::DaysMonth
1;
