Date::Advent - Calculate the Sundays of Advent
Version 1.20161222
Date::Advent takes a Time::Piece date and calculates all four Sundays of Advent for the current Christian liturgical year.
As Advent is the beginning of the Christian liturgical calendar, this usually results in the date for Advent in the current year being dates in the past. E.g. The Sundays of Advent returned for 12. March 2016 would be 29. November 2015, 6. December 2015, 13. December 2015, and 20. December 2015.
use Time::Piece; use Date::Advent; my $testAdvent = Date::Advent->new(date => Time::Piece->strptime("2016-01-01", "%Y-%m-%d")); say $testAdvent->firstSunday; #Gives date for first Sunday of Advent say $testAdvent->secondSunday; #Gives date for second Sunday of Advent say $testAdvent->thirdSunday; #Gives date for third Sunday of Advent say $testAdvent->fourthSunday; #Gives date for fourth Sunday of Advent say $testAdvent->christmas; #Gives date of Christmas
The development of this module is hosted on GitHub -- https://github.com/marmanold/Date-Advent -- and tested via TravisCI.
Time::Piece date object. Only attribute required at object construction.
Time::Piece attribute for Christmas Day as calculated from the date given at object construction.
date
Time::Piece attribute for the first Sunday of Advent as calculated from the date given at object construction.
Time::Piece attribute for the second Sunday of Advent as calculated from the date given at object construction.
Time::Piece attribute for the third Sunday of Advent as calculated from the date given at object construction.
Time::Piece attribute for the fourth Sunday of Advent as calculated from the date given at object construction.
Constructor for the Date::Advent object. Takes the Time::Piece argument of date as the date to calculate the current Christian liturgical year's Sundays of Advent from. The resulting object is immutable and cannot be changed once created.
my $testAdvent = Date::Advent->new(date => Time::Piece->strptime("2016-01-01", "%Y-%m-%d"));
Michael Wayne Arnold, <marmanold at cpan.org>
<marmanold at cpan.org>
Please report any bugs or feature requests to bug-date-advent at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Date-Advent. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-date-advent at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Date::Advent
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Date-Advent
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Date-Advent
CPAN Ratings
http://cpanratings.perl.org/d/Date-Advent
Search CPAN
http://search.cpan.org/dist/Date-Advent/
Many thanks to my beautiful wife, Jennifer, and my amazing daughter, Rosemary. But, above all, SOLI DEO GLORIA!
Copyright 2016 Michael Wayne Arnold.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Date::Advent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Date::Advent
CPAN shell
perl -MCPAN -e shell install Date::Advent
For more information on module installation, please visit the detailed CPAN module installation guide.