The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Date::DayOfWeek - Determine the day of the week for any date.

SYNOPSIS

  use Date::DayOfWeek;
  $dow = dayofweek( 25, 10, 1971 ); # dd, mm, yyyy

DESCRIPTION

Based on the Doomsday algorithm of John Conway.

dayofweek

    $dow = dayofweek( 25, 10, 1971 );
    $dow = dayofweek( 4, 7, 1776 );

Returns the day of the week for any date between 1500 and 2699.

Month should be in the range 1..12

The day of week that is returned is an integer in the range 0..6, with 0 = sunday, 1 = monday, etc.

HISTORY

    $Log: DayOfWeek.pm,v $
    Revision 1.13  2001/05/27 19:34:46  rbowen
    Rearranged argument order. day month year makes more sense.

    Revision 1.12  2001/05/27 03:44:03  rbowen
    Need to mod return value by 7.

    Revision 1.11  2001/05/27 03:41:31  rbowen
    This seems to work on all the dates that I've tested it for. More testing is
    needed.

    Revision 1.10  2001/05/27 03:13:57  rbowen
    Add DayOfWeek to repository.

AUTHOR

Rich Bowen (rbowen@rcbowen.com)

See Also

Date::Doomsday