GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Date::Easter(3) User Contributed Perl Documentation Date::Easter(3)

Date::Easter - Calculates Easter for any given year

  use Date::Easter;
  ($month, $day) = julian_easter(1752);
  ($month, $day) = easter(1753);
  ($month, $day) = gregorian_easter(1753);
  ($month, $day) = orthodox_easter(1823);

Calculates Easter for a given year.

easter() is, for the moment, an alias to gregorian_easter(), since that's what most people use now. The thought was to somehow know which of the other methods to call, that that proved to be rather sticky.

Date::Easter provides the following functions:

    ( $month, $day ) = julian_easter( $year );

Returns the month and day of easter in the given year, in the Julian calendar.

    ( $month, $day ) = gregorian_easter( $year );

Returns the month and day of easter in the given year, in the Gregorian calendar, which is what most of the world uses.

    ( $month, $day ) = easter( $year );

Returns the month and day of easter in the given year, in the Gregorian calendar, which is what most of the world uses.

    ( $month, $day ) = orthodox_easter( $year );

Returns the month and day of easter in the given year, in the Orthodox calendar.

From code by Pascalis Ligdas, based on original code by Apostolos Syropoulos

Rich Bowen <rbowen@rcbowen.com>

Since the dates that various countries switched to the Gregorian calendar vary greatly, it's hard to figure out when to use which method. Perhaps some sort of locale checking would be cool?

I need to test the Julian easter calculations, but I'm a little confused as to the difference between the Orthodox Easter and the Julian Easter. I need to read some more.

The use of localtime and timelocal locks us into the epoch, which is a rather silly limitation. Need to move to Date::DayOfWeek or other module to calculate the day of the week. This should immediately make the module usable back to the beginning of celebration of Easter.

Yes, Date::Manip already has code in it to do this. But Date::Manip is very big, and rather slow. I needed something faster and smaller, and did not need all that other stuff. And I have a real interest in date calculations, so I thought this would be fun. Date::Manip is a very cool module. I use it myself.

See also http://www.pauahtun.org/CalendarFAQ/cal/node3.html for more details on calculating Easter.

And many thanks to Simon Cozens who provided me with the code for the orthodox_easter function.

The tests are taken from a table at http://www.chariot.net.au/~gmarts/eastcalc.htm

The script 'easter' is just a simple way to find out when easter falls in a given year. Type 'easter' to find easter for this year, and 'easter 1983' to find when easter falls in 1983.

2015-01-19 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.