Date::Lectionary - Readings for the Christian Lectionary
Version 1.20161227
use Time::Piece; use Date::Lectionary; my $epiphany = Date::Lectionary->new('date'=>Time::Piece->strptime("2017-01-06", "%Y-%m-%d")); say $epiphany->day->name; #String representation of the name of the day in the liturgical calendar; e.g. 'The Epiphany' say $epiphany->year->name; #String representation of the name of the liturgical year; e.g. 'A' say ${$epiphany->readings}[0] #String representation of the first reading for the day.
Date::Lectionary takes a Time::Piece date and returns the liturgical day and associated readings for the day.
The Time::Piece object date given at object construction.
An optional attribute given at object creation time. Valid values are 'acna' for the Anglican Church of North America lectionary and 'rcl' for the Revised Common Lectionary with complementary readings in ordinary time. This attribute defaults to 'acna' if no value is given.
A Date::Lectionary::Day object containing attributes related to the liturgical day.
type: Stores the type of liturgical day. 'fixedFeast' is returned for non-moveable feast days such as Christmas Day. 'moveableFeast' is returned for moveable feast days. Moveable feasts move to a Monday when they occure on a Sunday. 'Sunday' is returned for non-fixed feast Sundays of the liturgical year. 'noLect' is returned for days with no feast day or Sunday readings.
type
name: The name of the day in the lectionary. For noLect days a String representation of the day is returned as the name.
name
alt: The alternative name --- if one is given --- of the day in the lectionary. If there is no alternative name for the day, then the empty string will be returned.
alt
multiLect: Returns 'yes' if the day has multiple services with readings associated with it. (E.g. Christmas Day, Easter, etc.) Returns 'no' if the day is a normal lectioanry day with only one service and one set of readings.
multiLect
A Date::Lectionary::Year object containing attributes related to the liturgical year the date given at object construction resides in.
name: Returns 'A', 'B', or 'C' depending on the liturgical year the date given at object construction resides in.
Return an ArrayRef of the String representation of the day's readings if there are any. Readings in the ArrayRef are ordered in the array according to the order the readings are given in the lectionary. If mutliple readings exist for the day, an ArrayRef of HashRefs will be given.
my $singleReading = Date::Lectionary->new( 'date' => Time::Piece->strptime( "2016-11-13", "%Y-%m-%d" ), 'lectionary' => 'acna' ); say ${ $testReading->readings }[1]; #Will print 'Ps 98', the second reading for the Sunday closest to November 16 in the default ACNA lectionary for year C. say $testReading->day->multiLect; #Will print 'no' because this day does not have multiple services in the lectionary. my $multiReading = Date::Lectionary->new( 'date' => Time::Piece->strptime( "2016-12-25", "%Y-%m-%d" ), 'lectionary' => 'rcl' ); say $multiReading->day->multiLect; #Will print 'yes' because this day does have multiple services in the lectionary. say ${ $multiReading->readings }[0]{name}; #Will print 'Christmas, Proper I', the first services of Christmas Day in the RCL say ${ $multiReading->readings }[1]{readings}[0]; #Will print 'Isaiah 62:6-12', the first reading of the second service 'Christmas, Proper II' on Christmas Day in the RCL.
Constructor for the Date::Lectionary object. Takes a Time::Piect object, date, to create the object.
date
Private method that returns an ArrayRef of HashRefs for the multiple services and lectionary readings associated with the date.
Private method that returns an ArrayRef of strings for the lectionary readings associated with the date.
Private method that takes a Time::Piece date object to returns a Date::Advent object containing the dates for Advent of the current liturgical year.
Michael Wayne Arnold, <marmanold at cpan.org>
<marmanold at cpan.org>
Please report any bugs or feature requests to bug-date-lectionary at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Date-Lectionary. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-date-lectionary at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Date::Lectionary
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Date-Lectionary
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Date-Lectionary
CPAN Ratings
http://cpanratings.perl.org/d/Date-Lectionary
Search CPAN
http://search.cpan.org/dist/Date-Lectionary/
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::Lectionary, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Date::Lectionary
CPAN shell
perl -MCPAN -e shell install Date::Lectionary
For more information on module installation, please visit the detailed CPAN module installation guide.