DateTime::Event::Easter

Returns Easter events for DateTime objects
Download

DateTime::Event::Easter Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Rick Measham
  • Publisher web site:
  • http://search.cpan.org/~rickm/

DateTime::Event::Easter Tags


DateTime::Event::Easter Description

Returns Easter events for DateTime objects DateTime::Event::Easter is a Perl module that returns Easter events for DateTime objects. From a given datetime, it can tell you the previous, the following and the closest Easter event. The 'is' method will tell you if the given DateTime is an Easter Event.Easter Events can be Palm Sunday, Maundy Thursday, Good Friday, Black Saturday and Easter Sunday. If that's not enough, the module will also accept an offset so you can get the date for Pentecost (49 days after Easter Sunday) by passing 49.SYNOPSIS use DateTime::Event::Easter; $dt = DateTime->new( year => 2002, month => 3, day => 31, ); $easter_sunday = DateTime::Event::Easter->new(); $previous_easter_sunday = $easter_sunday->previous($dt); # Sun, 15 Apr 2001 00:00:00 UTC $following_easter_sunday = $easter_sunday->following($dt); # Sun, 20 Apr 2003 00:00:00 UTC $closest_easter_sunday = $easter_sunday->closest($dt); # Sun, 31 Mar 2002 00:00:00 UTC $is_easter_sunday = $easter_sunday->is($dt); # 1 $palm_sunday = DateTime::Event::Easter->new(day=>'Palm Sunday'); $dt2 = DateTime->new( year => 2060, month => 4, day => 30, ); @set = $palm_sunday->as_list(from=>$dt, to=>$dt2, inclusive=>1); # Sun, 13 Apr 2003 00:00:00 UTC # Sun, 04 Apr 2004 00:00:00 UTC # Sun, 20 Mar 2005 00:00:00 UTC # Sun, 09 Apr 2006 00:00:00 UTC $datetime_set = $palm_sunday->as_set; # A set of every Palm Sunday ever. See C for more information. Requirements: · Perl


DateTime::Event::Easter Related Software