# 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 280 "web_diary_dir/lib/DateTime/Date.pm (autosplit into web_diary_dir/lib/auto/DateTime/Date/WeekNumber.al)"
sub WeekNumber ($)
{
    my $self = shift;

    my $first_week = ($self->week - $self->day+1) % 7;

#    print "day: " . $self->day . "\n";
#    print "fw: $first_week\n";
    my $n = int(($self->day-1)/7)+1;
#    print "[$n]";
    return $n;
#    return int(($self->day+$first_week-1)/7 + 1);
}

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