easter => ([western]|eastern)
Western Easter is the day celebrated by the Catholic and Protestant churches. It falls on the first Sunday after the first Full Moon on or after March 21st.
Eastern Easter, as celebrated by the Eastern Orthodox Churches similarly falls on the first Sunday after the first Full Moon on or after March 21st. However Eastern Easter uses March 21st in the Julian Calendar.
If this parameter is not supplied, the western Easter will be used.
day => ([Easter Sunday]|Palm Sunday|Maundy Thursday|Good Friday|Black
Saturday|Fat Tuesday|Ash Wednesday|Ascension|Pentecost|Trinity Sunday|n)
When constructed with a day parameter, the method can return associated Easter days other than Easter Sunday. The constructor also allows an integer to be passed here as an offset. For example, Maundy Thursday is the same as an offset of -3 (Three days before Easter Sunday)
This parameter also allows the following abreviations: day => ([Sunday]|Palm|Thursday|Friday|Saturday|Fat|Ash|Ascension|Pentecost|Trinity)
as => ([point]|span)
By default, all returns are single points in time. Namely they are the moment of midnight for the day in question. If you want Easter 2003 then you actually get back midnight of April 20th 2003. If you specify as => span in your constructor, youll now receive 24 hour spans rather than moments (or points). See also the as_span and as_point methods below
For all these methods, unless otherwise noted, $dt is a plain vanila DateTime object or a DateTime object from any DateTime::Calendar module that can handle calls to from_object and utc_rd_values (which should be all of them, but theres nothing stopping someone making a bad egg).
This class offers the following methods.
o following($dt) o previous($dt) o closest($dt) o is($dt) o as_list(from => $dt, to => $dt2, inclusive=>(|1))
Returns a list of Easter Events between to and from.
If you do not include an inclusive parameter, we assume you do not want to include these dates (the same behaviour as supplying a false value)
Returns a DateTime::Set of Easter Events.
In the past this method used the same syntax as as_list above. However we now allow both the above syntax as well as the full options allowable when creating sets with DateTime::Set. This means you can call $datetime_set = $palm_sunday->as_set; and it will return a DateTime::Set of all Palm Sundays. See DateTime::Set for more information.
This method switches output to spans rather than points. See the as attribute of the constructor for more information. The method returns the object for easy chaining.
This method switches output to points rather than spans. See the as attribute of the constructor for more information. The method returns the object for easy chaining.
This class does not export any methods by default, however the following exports are supported.
Given a Gregorian year, this method will return a DateTime object for Western Easter Sunday in that year.
o http://datetime.perl.org - The official home of the DateTime project o http://www.tondering.dk/claus/calendar.html - Claus To\k:/nderings calendar FAQ
Support for this module, and for all DateTime modules will be given through the DateTime mailing list - firstname.lastname@example.org.
Bugs should be reported through rt.cpan.org.
Rick Measham <email@example.com>
Co-maintainer Jean Forget <firstname.lastname@example.org>
Much help from the DateTime mailing list, especially from:
<B>Eugene van der PijllB> - who pointed out flaws causing errors on gregorian years with no eastern easter (like 35000) and who came up with a patch to make the module accept any calendars DateTime object
(c) Copyright 2003, 2004, 2015 Rick Measham and Jean Forget. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself: GNU Public License version 1 or later and Perl Artistic License.
The full text of the license can be found in the LICENSE file included with this module or at <http://www.perlfoundation.org/artistic_license_1_0> and <http://www.gnu.org/licenses/gpl-1.0.html>.
Here is the summary of GPL:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|perl v5.20.3||DATETIME::EVENT::EASTER (3)||2015-01-21|