1Date::Easter(3) User Contributed Perl Documentation Date::Easter(3)
2
3
4
6 Date::Easter - Calculates Easter for any given year
7
9 use Date::Easter;
10 ($month, $day) = julian_easter(1752);
11 ($month, $day) = easter(1753);
12 ($month, $day) = gregorian_easter(1753);
13 ($month, $day) = orthodox_easter(1823);
14
16 Calculates Easter for a given year.
17
18 easter() is, for the moment, an alias to gregorian_easter(), since
19 that's what most people use now. The thought was to somehow know which
20 of the other methods to call, that that proved to be rather sticky.
21
22 Date::Easter provides the following functions:
23
24 julian_easter
25 ( $month, $day ) = julian_easter( $year );
26
27 Returns the month and day of easter in the given year, in the Julian
28 calendar.
29
30 gregorian_easter
31 ( $month, $day ) = gregorian_easter( $year );
32
33 Returns the month and day of easter in the given year, in the Gregorian
34 calendar, which is what most of the world uses.
35
36 easter
37 ( $month, $day ) = easter( $year );
38
39 Returns the month and day of easter in the given year, in the Gregorian
40 calendar, which is what most of the world uses.
41
42 orthodox_easter
43 ( $month, $day ) = orthodox_easter( $year );
44
45 Returns the month and day of easter in the given year, in the Orthodox
46 calendar.
47
48 From code by Pascalis Ligdas, based on original code by Apostolos
49 Syropoulos
50
52 Rich Bowen <rbowen@rcbowen.com>
53
55 Since the dates that various countries switched to the Gregorian
56 calendar vary greatly, it's hard to figure out when to use which
57 method. Perhaps some sort of locale checking would be cool?
58
59 I need to test the Julian easter calculations, but I'm a little
60 confused as to the difference between the Orthodox Easter and the
61 Julian Easter. I need to read some more.
62
63 The use of localtime and timelocal locks us into the epoch, which is a
64 rather silly limitation. Need to move to Date::DayOfWeek or other
65 module to calculate the day of the week. This should immediately make
66 the module usable back to the beginning of celebration of Easter.
67
69 Yes, Date::Manip already has code in it to do this. But Date::Manip is
70 very big, and rather slow. I needed something faster and smaller, and
71 did not need all that other stuff. And I have a real interest in date
72 calculations, so I thought this would be fun. Date::Manip is a very
73 cool module. I use it myself.
74
75 See also http://www.pauahtun.org/CalendarFAQ/cal/node3.html for more
76 details on calculating Easter.
77
78 And many thanks to Simon Cozens who provided me with the code for the
79 orthodox_easter function.
80
81 The tests are taken from a table at
82 http://www.chariot.net.au/~gmarts/eastcalc.htm
83
84 The script 'easter' is just a simple way to find out when easter falls
85 in a given year. Type 'easter' to find easter for this year, and
86 'easter 1983' to find when easter falls in 1983.
87
88
89
90perl v5.30.0 2019-07-26 Date::Easter(3)