Lectionary/Day.pm

filter: Statementstmt 95.6% 485 / 507 Branchbran 97.4% 271 / 278 Conditioncond 97.8% 91 / 93 MC/DCmcdc 96.7% 59 / 61 Subroutinesub 79.1% 53 / 67 Podpod 100% 1 / 1 totaltotal 95.3% 960 / 1007 CC 173 SCAR 32.0
CC
173
Cov
96%
_buildMoveableDays
61.0
_determineOrdinary
29.0
_buildFixedDays
19.0
CRAP 24.4
↑ Summary Lectionary/Year.pm »
1 package Date::Lectionary::Day;
2  
3 9 ▶use v5.22;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 9 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 9 ▶use MooseX::Aliases;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 9 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 9 ▶use Try::Catch;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 9 ▶use Time::Piece;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 9 ▶use Time::Seconds;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 9 ▶use Date::Advent;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 9 ▶use Date::Easter;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 9 ▶use Date::Lectionary::Time qw(nextSunday prevSunday closestSunday);
Subroutine BEGIN: called CC=1 SCAR=0.0
17 9 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 9 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 9 ▶use File::Share ':all';
Subroutine BEGIN: called CC=1 SCAR=0.0
20 9 ▶use XML::LibXML;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 =head1 NAME
23  
24 Date::Lectionary::Day - Determines the Day in the Christian Liturgical Year
25  
26 =head1 VERSION
27  
28 Version 1.20180422
29  
30 =cut
31  
32 9 ▶use version; our $VERSION = version->declare("v1.20180422");
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 =head1 SYNOPSIS
35  
36 A helper object for Date::Lectionary to determine the liturgical name(s) and type for the given day according to a given lectionary.
37  
38 =cut
39  
40 9 enum 'DayType', [qw(fixedFeast moveableFeast Sunday noLect)];
41 9 enum 'LectionaryType', [qw(acna rcl)];
42 9 enum 'MultiLect', [qw(yes no)];
43 9 enum 'IncludeFeasts', [qw(yes no)];
44 9 ▶no Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 =head1 SUBROUTINES/METHODS/ATTRIBUTES
47  
48 =head2 ATTRIBUTES
49  
50 =head3 date
51  
52 The Time::Piece object date given at object construction.
53  
54 =head3 lectionary
55  
56 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. This attribute defaults to 'acna' if no value is given.
57  
58 =head3 type
59  
60 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.
61  
62 =head3 name
63  
64 The name of the day in the lectionary. For noLect days a String representation of the day is returned as the name.
65  
66 =head3 alt
67  
68 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.
69  
70 =head3 multiLect
71  
72 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.
73  
74 =head3 subLects
75  
76 An ArrayRef of the names of the multiple services that occur on a multiLect day.
77  
78 =head3 includeFeasts
79  
80 If this is set to 'yes' --- the default value --- the module will include fixed and moveable feasts in its determination of which liturgical Sunday it is.
81  
82 If set to 'no', it will exclude fixed and moveable feasts. Excluding feasts is useful when using Date::Lectionary::Day in combination with a daily lectionary such as Date::Lectioary::Daily where a fixed feast such as The Transfiguration can conflict with determining the Sunday to use for the daily lectionary.
83  
84 =cut
85  
86 9 has 'date' => (
87 is => 'ro',
88 isa => 'Time::Piece',
89 required => 1,
90 );
91  
92 9 has 'type' => (
93 is => 'ro',
94 isa => 'DayType',
95 writer => '_setType',
96 init_arg => undef,
97 );
98  
99 9 has 'lectionary' => (
100 is => 'ro',
101 isa => 'LectionaryType',
102 default => 'acna',
103 );
104  
105 9 has 'displayName' => (
106 is => 'ro',
107 isa => 'Str',
108 writer => '_setDisplayName',
109 init_arg => undef,
110 alias => 'name',
111 );
112  
113 9 has 'altName' => (
114 is => 'ro',
115 isa => 'Str',
116 writer => '_setAltName',
117 init_arg => undef,
118 alias => 'alt',
119 );
120  
121 9 has 'commonName' => (
122 is => 'ro',
123 isa => 'Str',
124 writer => '_setCommonName',
125 init_arg => undef,
126 );
127  
128 9 has 'multiLect' => (
129 is => 'ro',
130 isa => 'MultiLect',
131 writer => '_setMultiLect',
132 init_arg => undef,
133 );
134  
135 9 has 'subLects' => (
136 is => 'ro',
137 isa => 'ArrayRef',
138 writer => '_setSubLects',
139 init_arg => undef,
140 );
141  
142 9 has 'includeFeasts' => (
143 is => 'ro',
144 isa => 'IncludeFeasts',
145 default => 'yes',
146 );
147  
148 =head2 BUILD
149  
150 Constructor for the Date::Lectionary object. Takes a Time::Piect object, C<date>, to create the object.
151  
152 =cut
153  
154 sub BUILD {
155 613 ▶ my $self = shift;
Subroutine BUILD: called CC=1 SCAR=0.0
Pod documented
156  
157 613 my $advent = _determineAdvent( $self->date );
158 613 my $easter = _determineEaster( $advent->firstSunday->year + 1 );
159  
160 613 my %commonNameInfo = _determineDay( $self->date, $self->lectionary, $self->includeFeasts, $advent, $easter );
161 613 $self->_setCommonName( $commonNameInfo{commonName} );
162 613 $self->_setDisplayName( _determineDisplayName( $self->lectionary, $commonNameInfo{commonName} ) );
163 613 $self->_setAltName( _determineAltName( $self->lectionary, $commonNameInfo{commonName} ) );
164  
165 613 $self->_setType( $commonNameInfo{type} );
166  
167 613 my %multiLectInfo = _determineMultiLect( $self->lectionary, $commonNameInfo{commonName} );
168 613 $self->_setMultiLect( $multiLectInfo{multiLect} );
169 613 $self->_setSubLects( $multiLectInfo{multiNames} );
170 }
171  
172 =head2 _determineMultiLect
173  
174 Private method to determine if the day has multiple lectionary services and readings for the day.
175  
176 =cut
177  
178 sub _determineMultiLect {
179 613 ▶ my $tradition = shift;
Subroutine _determineMultiLect: called CC=1 SCAR=0.0
180 613 my $commonName = shift;
181  
182 613 my $parser = XML::LibXML->new();
183 613 my $data_location;
184 my $lectionary;
185  
186 try {
187 613 ▶ $data_location = dist_file( 'Date-Lectionary', 'date_lectionary_xref.xml' );
Subroutine __ANON__: called CC=1 SCAR=0.0
188 613 $lectionary = $parser->parse_file($data_location);
189 }
190 catch {
191 0 ▶ confess "The lectionary cross reference file could not be found or parsed.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
192 613 };
193  
194 613 my $compiled_xpath;
195  
196 try {
197 613 ▶ $compiled_xpath = XML::LibXML::XPathExpression->new("/xref/day[\@multi=\"$commonName\"]/alt[\@type='$tradition']");
Subroutine __ANON__: called CC=1 SCAR=0.0
198 }
199 catch {
200 0 ▶ confess "The XPATH expression to to query the cross reference database could not be compiled.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
201 613 };
202  
203 613 my @multiNames;
204  
205 try {
206 613 ▶ if ( $lectionary->exists($compiled_xpath) ) {
Subroutine __ANON__: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
if ($lectionary->exists($compiled_xpath)) { } 28 585 613
207 28 my @nodes = $lectionary->findnodes($compiled_xpath);
208 28 foreach my $node (@nodes) {
209 83 push( @multiNames, $node->textContent );
210 }
211 28 return ( multiLect => 'yes', multiNames => \@multiNames );
212 }
213 else {
214 585 return ( multiLect => 'no', multiNames => \@multiNames );
215 }
216 }
217 catch {
218 0 ▶ confess "An unpected error occured while querying the cross reference database.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
219 613 };
220 }
221  
222 =head2 _determineDisplayName
223  
224 Private method to determine the unique display name for the day.
225  
226 =cut
227  
228 sub _determineDisplayName {
229 613 ▶ my $tradition = shift;
Subroutine _determineDisplayName: called CC=1 SCAR=0.0
230 613 my $commonName = shift;
231  
232 613 my $parser = XML::LibXML->new();
233 613 my $data_location;
234 my $lectionary;
235  
236 try {
237 613 ▶ $data_location = dist_file( 'Date-Lectionary', 'date_lectionary_xref.xml' );
Subroutine __ANON__: called CC=1 SCAR=0.0
238 613 $lectionary = $parser->parse_file($data_location);
239 }
240 catch {
241 0 ▶ confess "The lectionary cross reference file could not be found or parsed.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
242 613 };
243  
244 613 my $compiled_xpath;
245 my $multi_xpath;
246  
247 try {
248 613 ▶ $compiled_xpath = XML::LibXML::XPathExpression->new("/xref/day[\@name=\"$commonName\"]/alt[\@type='$tradition']");
Subroutine __ANON__: called CC=1 SCAR=0.0
249 613 $multi_xpath = XML::LibXML::XPathExpression->new("/xref/day[\@multi=\"$commonName\"]");
250 }
251 catch {
252 0 ▶ confess "The XPATH expression to to query the cross reference database could not be compiled.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
253 613 };
254  
255 613 my $displayName;
256  
257 try {
258 613 ▶ $displayName = $lectionary->findvalue($compiled_xpath);
Subroutine __ANON__: called CC=3 SCAR=11.0
259  
260 613 ▶ if ( $lectionary->exists($multi_xpath) ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($lectionary->exists($multi_xpath)) { } 28 585 613
elsif ($displayName eq '') { } 80 505 585
261 28 return $commonName;
262 }
263 elsif ( $displayName eq '' ) {
264 80 return $commonName;
265 }
266 else {
267 505 return $displayName;
268 }
269 }
270 catch {
271 0 ▶ confess "An unpected error occured while querying the cross reference database.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
272 613 };
273  
274 }
275  
276 =head2 _determineAltName
277  
278 Private method to determine if the day has any alternative names for the day.
279  
280 =cut
281  
282 sub _determineAltName {
283 613 ▶ my $tradition = shift;
Subroutine _determineAltName: called CC=1 SCAR=0.1
284 613 my $commonName = shift;
285  
286 613 my $parser = XML::LibXML->new();
287 613 my $data_location;
288 my $lectionary;
289  
290 try {
291 613 ▶ $data_location = dist_file( 'Date-Lectionary', 'date_lectionary_xref.xml' );
Subroutine __ANON__: called CC=1 SCAR=0.0
292 613 $lectionary = $parser->parse_file($data_location);
293 }
294 catch {
295 0 ▶ confess "The lectionary cross reference file could not be found or parsed.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
296 613 };
297  
298 613 my $compiled_xpath;
299 my $multi_xpath;
300  
301 try {
302 613 ▶ $compiled_xpath = XML::LibXML::XPathExpression->new("/xref/day[\@name=\"$commonName\"]/alt[\@type='$tradition-alt']");
Subroutine __ANON__: called CC=1 SCAR=0.0
303 }
304 catch {
305 0 ▶ confess "The XPATH expression to to query the cross reference database could not be compiled.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
306 613 };
307  
308 613 my $altName;
309  
310 try {
311 613 ▶ $altName = $lectionary->findvalue($compiled_xpath);
Subroutine __ANON__: called CC=1 SCAR=0.0
312 613 return $altName;
313 }
314 catch {
315 0 ▶ confess "An unpected error occured while querying the cross reference database.";
Subroutine __ANON__: not called CC=1 SCAR=6.9
316 613 };
317  
318 }
319  
320 =head2 _determineAdvent
321  
322 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.
323  
324 =cut
325  
326 sub _determineAdvent {
327 613 ▶ my $date = shift;
Subroutine _determineAdvent: called CC=1 SCAR=0.0
328  
329 613 my $advent = undef;
330  
331 try {
332 613 ▶ $advent = Date::Advent->new( date => $date );
Subroutine __ANON__: called CC=1 SCAR=0.0
333 613 return $advent;
334 }
335 catch {
336 0 ▶ confess "Could not calculate Advent for the given date [" . $date->ymd . "].";
Subroutine __ANON__: not called CC=1 SCAR=6.9
337 613 };
338 }
339  
340 =head2 _determineEaster
341  
342 Private method that takes a four-digit representation of a Common Era year and calculates the date for Easter as a Time::Piece object.
343  
344 =cut
345  
346 sub _determineEaster {
347 613 ▶ my $easterYear = shift;
Subroutine _determineEaster: called CC=1 SCAR=0.0
348  
349 613 my $easter = undef;
350  
351 try {
352 613 ▶ my ( $easterMonth, $easterDay ) = easter($easterYear);
Subroutine __ANON__: called CC=1 SCAR=0.0
353 613 $easter = Time::Piece->strptime( $easterYear . "-" . $easterMonth . "-" . $easterDay, "%Y-%m-%d" );
354 613 return $easter;
355 }
356 catch {
357 0 ▶ confess "Could not calculate Easter for the year [" . $easterYear . "]";
Subroutine __ANON__: not called CC=1 SCAR=6.9
358 613 };
359 }
360  
361 =head2 _determineFeasts
362  
363 Private method that takes the Time::Piece date given at construction and determines if the date is one of many feasts in the liturgical calendar. Feasts are taken from the Anglican Church in North America's revision of the revised common lectionary.
364  
365 =cut
366  
367 sub _determineFeasts {
368 515 ▶ my $date = shift;
Subroutine _determineFeasts: called CC=6 SCAR=17.9
369 515 my $lectionary = shift;
370  
371 515 my $yesterday = $date - ONE_DAY;
372  
373 515 my $yesterdayName;
374 515 ▶ if ( $yesterday->wday == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($yesterday->wday == 1) 26 489 515
375 26 $yesterdayName = _buildMoveableDays( $yesterday, $lectionary );
376 }
377  
378 515 ▶ if ($yesterdayName) {
Branch: 1 branch
BranchTrueFalseTotal
if ($yesterdayName) 17 498 515
379 17 return ( commonName => $yesterdayName, type => 'moveableFeast' );
380 }
381  
382 498 my $fixedDayName = _buildFixedDays( $date, $lectionary );
383 498 ▶ if ($fixedDayName) {
Branch: 1 branch
BranchTrueFalseTotal
if ($fixedDayName) 22 476 498
384 22 return ( commonName => $fixedDayName, type => 'fixedFeast' );
385 }
386  
387 476 my $moveableDayName = _buildMoveableDays( $date, $lectionary );
388 476 ▶ if ( $moveableDayName && $date->wday != 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($moveableDayName and $date->wday != 1) 28 448 476
Condition100%3/3
$moveableDayName and $date->wday != 1
!ll&&!rl&&r
4311728
MC/DC100%2/2
$moveableDayName and $date->wday != 1
$moveableDayName $date->wday != 1
Truth table100%3/3
A and B
A= $moveableDayNameB= $date->wday != 1
ABresult
0X0
100
111
389 28 return ( commonName => $moveableDayName, type => 'moveableFeast' );
390 }
391  
392 448 return ( commonName => undef, type => undef );
393 }
394  
395 =head2 _buildMoveableDays
396  
397 Private method that takes the Time::Piece date given at construction and determines if the date is one of many moveable feasts in the liturgical calendar. Feasts are taken from the Anglican Church in North America's revision of the revised common lectionary.
398  
399 =cut
400  
401 sub _buildMoveableDays {
402 502 ▶ my $date = shift;
Subroutine _buildMoveableDays: called CC=61 SCAR=41.1
403 502 my $lectionary = shift;
404  
405 #Moveable holidays in January
406 502 ▶ if ( $date->mon == 1 ) {
Branch: 12 branches
BranchTrueFalseTotal
if ($date->mon == 1) { } 53 449 502
elsif ($date->mon == 2) { } 47 402 449
elsif ($date->mon == 3) { } 36 366 402
elsif ($date->mon == 4) { } 34 332 366
elsif ($date->mon == 5) { } 43 289 332
elsif ($date->mon == 6) { } 41 248 289
elsif ($date->mon == 7) { } 48 200 248
elsif ($date->mon == 8) { } 41 159 200
elsif ($date->mon == 9) { } 42 117 159
elsif ($date->mon == 10) { } 51 66 117
elsif ($date->mon == 11) { } 46 20 66
elsif ($date->mon == 12) { } 20 0 20
407 53 ▶ if ( $date->mday == 18 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 18 and $lectionary eq "acna") 4 49 53
Condition100%3/3
$date->mday == 18 and $lectionary eq "acna"
!ll&&!rl&&r
4724
MC/DC100%2/2
$date->mday == 18 and $lectionary eq "acna"
$date->mday == 18 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 18B= $lectionary eq "acna"
ABresult
0X0
100
111
408 4 return "Confession of St. Peter";
409 }
410 49 ▶ if ( $date->mday == 25 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 25 and $lectionary eq "acna") 4 45 49
Condition100%3/3
$date->mday == 25 and $lectionary eq "acna"
!ll&&!rl&&r
4324
MC/DC100%2/2
$date->mday == 25 and $lectionary eq "acna"
$date->mday == 25 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 25B= $lectionary eq "acna"
ABresult
0X0
100
111
411 4 return "Conversion of St. Paul";
412 }
413 }
414  
415 #Moveable holidays in February
416 elsif ( $date->mon == 2 ) {
417 47 ▶ if ( $date->mday == 2 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 2) 4 43 47
418 4 return "The Presentation of Christ in the Temple";
419 }
420 43 ▶ if ( $date->mday == 24 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 24 and $lectionary eq "acna") 2 41 43
Condition100%3/3
$date->mday == 24 and $lectionary eq "acna"
!ll&&!rl&&r
3922
MC/DC100%2/2
$date->mday == 24 and $lectionary eq "acna"
$date->mday == 24 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 24B= $lectionary eq "acna"
ABresult
0X0
100
111
421 2 return "St. Matthias";
422 }
423 }
424  
425 #Moveable holidays in March
426 elsif ( $date->mon == 3 ) {
427 36 ▶ if ( $date->mday == 19 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 19 and $lectionary eq "acna") 4 32 36
Condition100%3/3
$date->mday == 19 and $lectionary eq "acna"
!ll&&!rl&&r
3024
MC/DC100%2/2
$date->mday == 19 and $lectionary eq "acna"
$date->mday == 19 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 19B= $lectionary eq "acna"
ABresult
0X0
100
111
428 4 return "St. Joseph";
429 }
430 32 ▶ if ( $date->mday == 25 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 25) 2 30 32
431 2 return "The Annunciation";
432 }
433 }
434  
435 #Moveable holidays in April
436 elsif ( $date->mon == 4 ) {
437 34 ▶ if ( $date->mday == 25 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 25 and $lectionary eq "acna") 1 33 34
Condition100%3/3
$date->mday == 25 and $lectionary eq "acna"
!ll&&!rl&&r
3211
MC/DC100%2/2
$date->mday == 25 and $lectionary eq "acna"
$date->mday == 25 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 25B= $lectionary eq "acna"
ABresult
0X0
100
111
438 1 return "St. Mark";
439 }
440 }
441  
442 #Moveable holidays in May
443 elsif ( $date->mon == 5 ) {
444 43 ▶ if ( $date->mday == 1 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 1 and $lectionary eq "acna") 4 39 43
Condition100%3/3
$date->mday == 1 and $lectionary eq "acna"
!ll&&!rl&&r
3724
MC/DC100%2/2
$date->mday == 1 and $lectionary eq "acna"
$date->mday == 1 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 1B= $lectionary eq "acna"
ABresult
0X0
100
111
445 4 return "St. Philip & St. James";
446 }
447 39 ▶ if ( $date->mday == 31 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 31) 6 33 39
448 6 return "The Visitation";
449 }
450 }
451  
452 #Moveable holidays in June
453 elsif ( $date->mon == 6 ) {
454 41 ▶ if ( $date->mday == 11 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 11 and $lectionary eq "acna") 4 37 41
Condition100%3/3
$date->mday == 11 and $lectionary eq "acna"
!ll&&!rl&&r
3524
MC/DC100%2/2
$date->mday == 11 and $lectionary eq "acna"
$date->mday == 11 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 11B= $lectionary eq "acna"
ABresult
0X0
100
111
455 4 return "St. Barnabas";
456 }
457 37 ▶ if ( $date->mday == 24 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 24 and $lectionary eq "acna") 1 36 37
Condition100%3/3
$date->mday == 24 and $lectionary eq "acna"
!ll&&!rl&&r
3511
MC/DC100%2/2
$date->mday == 24 and $lectionary eq "acna"
$date->mday == 24 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 24B= $lectionary eq "acna"
ABresult
0X0
100
111
458 1 return "Nativity of St. John the Baptist";
459 }
460 36 ▶ if ( $date->mday == 29 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 29 and $lectionary eq "acna") 1 35 36
Condition100%3/3
$date->mday == 29 and $lectionary eq "acna"
!ll&&!rl&&r
3411
MC/DC100%2/2
$date->mday == 29 and $lectionary eq "acna"
$date->mday == 29 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 29B= $lectionary eq "acna"
ABresult
0X0
100
111
461 1 return "St. Peter & St. Paul";
462 }
463 }
464  
465 #Moveable holidays in July
466 elsif ( $date->mon == 7 ) {
467 48 ▶ if ( $date->mday == 22 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 22 and $lectionary eq "acna") 2 46 48
Condition100%3/3
$date->mday == 22 and $lectionary eq "acna"
!ll&&!rl&&r
4512
MC/DC100%2/2
$date->mday == 22 and $lectionary eq "acna"
$date->mday == 22 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 22B= $lectionary eq "acna"
ABresult
0X0
100
111
468 2 return "St. Mary Magdalene";
469 }
470 46 ▶ if ( $date->mday == 25 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 25 and $lectionary eq "acna") 1 45 46
Condition100%3/3
$date->mday == 25 and $lectionary eq "acna"
!ll&&!rl&&r
4411
MC/DC100%2/2
$date->mday == 25 and $lectionary eq "acna"
$date->mday == 25 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 25B= $lectionary eq "acna"
ABresult
0X0
100
111
471 1 return "St. James";
472 }
473 }
474  
475 #Moveable holidays in August
476 elsif ( $date->mon == 8 ) {
477 41 ▶ if ( $date->mday == 15 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 15 and $lectionary eq "acna") 1 40 41
Condition100%3/3
$date->mday == 15 and $lectionary eq "acna"
!ll&&!rl&&r
3911
MC/DC100%2/2
$date->mday == 15 and $lectionary eq "acna"
$date->mday == 15 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 15B= $lectionary eq "acna"
ABresult
0X0
100
111
478 1 return "St. Mary the Virgin";
479 }
480 40 ▶ if ( $date->mday == 24 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 24 and $lectionary eq "acna") 1 39 40
Condition100%3/3
$date->mday == 24 and $lectionary eq "acna"
!ll&&!rl&&r
3811
MC/DC100%2/2
$date->mday == 24 and $lectionary eq "acna"
$date->mday == 24 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 24B= $lectionary eq "acna"
ABresult
0X0
100
111
481 1 return "St. Bartholomew";
482 }
483 }
484  
485 #Moveable holidays in September
486 elsif ( $date->mon == 9 ) {
487 42 ▶ if ( $date->mday == 14 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 14) 2 40 42
488 2 return "Holy Cross Day";
489 }
490 40 ▶ if ( $date->mday == 21 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 21 and $lectionary eq "acna") 1 39 40
Condition100%3/3
$date->mday == 21 and $lectionary eq "acna"
!ll&&!rl&&r
3811
MC/DC100%2/2
$date->mday == 21 and $lectionary eq "acna"
$date->mday == 21 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 21B= $lectionary eq "acna"
ABresult
0X0
100
111
491 1 return "St. Matthew";
492 }
493 39 ▶ if ( $date->mday == 29 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 29 and $lectionary eq "acna") 1 38 39
Condition100%3/3
$date->mday == 29 and $lectionary eq "acna"
!ll&&!rl&&r
3711
MC/DC100%2/2
$date->mday == 29 and $lectionary eq "acna"
$date->mday == 29 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 29B= $lectionary eq "acna"
ABresult
0X0
100
111
494 1 return "Holy Michael & All Angels";
495 }
496 }
497  
498 #Moveable holidays in October
499 elsif ( $date->mon == 10 ) {
500 51 ▶ if ( $date->mday == 18 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 18 and $lectionary eq "acna") 6 45 51
Condition100%3/3
$date->mday == 18 and $lectionary eq "acna"
!ll&&!rl&&r
4236
MC/DC100%2/2
$date->mday == 18 and $lectionary eq "acna"
$date->mday == 18 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 18B= $lectionary eq "acna"
ABresult
0X0
100
111
501 6 return "St. Luke";
502 }
503 45 ▶ if ( $date->mday == 28 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 28 and $lectionary eq "acna") 1 44 45
Condition100%3/3
$date->mday == 28 and $lectionary eq "acna"
!ll&&!rl&&r
4311
MC/DC100%2/2
$date->mday == 28 and $lectionary eq "acna"
$date->mday == 28 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 28B= $lectionary eq "acna"
ABresult
0X0
100
111
504 1 return "St. Simon & St. Jude";
505 }
506 }
507  
508 #Moveable holidays in November
509 elsif ( $date->mon == 11 ) {
510 46 ▶ if ( $date->mday == 30 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 30 and $lectionary eq "acna") 1 45 46
Condition100%3/3
$date->mday == 30 and $lectionary eq "acna"
!ll&&!rl&&r
4411
MC/DC100%2/2
$date->mday == 30 and $lectionary eq "acna"
$date->mday == 30 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 30B= $lectionary eq "acna"
ABresult
0X0
100
111
511 1 return "St. Andrew";
512 }
513 }
514  
515 #Moveable holidays in December
516 elsif ( $date->mon == 12 ) {
517 20 ▶ if ( $date->mday == 21 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 21 and $lectionary eq "acna") 1 19 20
Condition100%3/3
$date->mday == 21 and $lectionary eq "acna"
!ll&&!rl&&r
1811
MC/DC100%2/2
$date->mday == 21 and $lectionary eq "acna"
$date->mday == 21 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 21B= $lectionary eq "acna"
ABresult
0X0
100
111
518 1 return "St. Thomas";
519 }
520 19 ▶ if ( $date->mday == 26 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 26 and $lectionary eq "acna") 2 17 19
Condition100%3/3
$date->mday == 26 and $lectionary eq "acna"
!ll&&!rl&&r
1612
MC/DC100%2/2
$date->mday == 26 and $lectionary eq "acna"
$date->mday == 26 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 26B= $lectionary eq "acna"
ABresult
0X0
100
111
521 2 return "St. Stephen";
522 }
523 17 ▶ if ( $date->mday == 27 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 27 and $lectionary eq "acna") 4 13 17
Condition100%3/3
$date->mday == 27 and $lectionary eq "acna"
!ll&&!rl&&r
1124
MC/DC100%2/2
$date->mday == 27 and $lectionary eq "acna"
$date->mday == 27 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 27B= $lectionary eq "acna"
ABresult
0X0
100
111
524 4 return "St. John";
525 }
526 13 ▶ if ( $date->mday == 28 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 28 and $lectionary eq "acna") 1 12 13
Condition100%3/3
$date->mday == 28 and $lectionary eq "acna"
!ll&&!rl&&r
1021
MC/DC100%2/2
$date->mday == 28 and $lectionary eq "acna"
$date->mday == 28 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 28B= $lectionary eq "acna"
ABresult
0X0
100
111
527 1 return "Holy Innocents";
528 }
529 }
530 else {
531 0 confess "Date [" . $date->ymd . "] is not a known or valid date.";
532 }
533 }
534  
535 =head2 _buildFixedDays
536  
537 Private method that takes the Time::Piece date given at construction and determines if the date is one of many fixed (non-moveable) feasts in the liturgical calendar. Fixed feasts are taken from the Anglican Church in North America's revision of the revised common lectionary.
538  
539 =cut
540  
541 sub _buildFixedDays {
542 498 ▶ my $date = shift;
Subroutine _buildFixedDays: called CC=19 SCAR=29.5
543 498 my $lectionary = shift;
544  
545 #Fixed holidays in January
546 498 ▶ if ( $date->mon == 1 ) {
Branch: 12 branches
BranchTrueFalseTotal
if ($date->mon == 1) { } 55 443 498
elsif ($date->mon == 2) { } 47 396 443
elsif ($date->mon == 3) { } 33 363 396
elsif ($date->mon == 4) { } 34 329 363
elsif ($date->mon == 5) { } 37 292 329
elsif ($date->mon == 6) { } 38 254 292
elsif ($date->mon == 7) { } 47 207 254
elsif ($date->mon == 8) { } 44 163 207
elsif ($date->mon == 9) { } 42 121 163
elsif ($date->mon == 10) { } 48 73 121
elsif ($date->mon == 11) { } 50 23 73
elsif ($date->mon == 12) { } 23 0 23
547 55 ▶ if ( $date->mday == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 1) 6 49 55
548 6 return "Holy Name";
549 }
550 49 ▶ if ( $date->mday == 6 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 6) 2 47 49
551 2 return "The Epiphany";
552 }
553 }
554  
555 #Fixed holidays in February
556 elsif ( $date->mon == 2 ) {
557 }
558  
559 #Fixed holidays in March
560 elsif ( $date->mon == 3 ) {
561 }
562  
563 #Fixed holidays in April
564 elsif ( $date->mon == 4 ) {
565 }
566  
567 #Fixed holidays in May
568 elsif ( $date->mon == 5 ) {
569 }
570  
571 #Fixed holidays in June
572 elsif ( $date->mon == 6 ) {
573 }
574  
575 #Fixed holidays in July
576 elsif ( $date->mon == 7 ) {
577 }
578  
579 #Fixed holidays in August
580 elsif ( $date->mon == 8 ) {
581 44 ▶ if ( $date->mday == 6 && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 6 and $lectionary eq "acna") 3 41 44
Condition100%3/3
$date->mday == 6 and $lectionary eq "acna"
!ll&&!rl&&r
4013
MC/DC100%2/2
$date->mday == 6 and $lectionary eq "acna"
$date->mday == 6 $lectionary eq "acna"
Truth table100%3/3
A and B
A= $date->mday == 6B= $lectionary eq "acna"
ABresult
0X0
100
111
582 3 return "The Transfiguration";
583 }
584 }
585  
586 #Fixed holidays in September
587 elsif ( $date->mon == 9 ) {
588 }
589  
590 #Fixed holidays in October
591 elsif ( $date->mon == 10 ) {
592 }
593  
594 #Fixed holidays in November
595 elsif ( $date->mon == 11 ) {
596 50 ▶ if ( $date->mday == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 1) 4 46 50
597 4 return "All Saints' Day";
598 }
599 }
600  
601 #Fixed holidays in December
602 elsif ( $date->mon == 12 ) {
603 23 ▶ if ( $date->mday == 25 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->mday == 25) 7 16 23
604 7 return "Christmas Day";
605 }
606 }
607 else {
608 0 confess "Date [" . $date->ymd . "] is not a known or valid date.";
609 }
610 }
611  
612 =head2 _determineAshWednesday
613  
614 Private method that takes the Time::Piece date for Easter and determines the date for Ash Wednesday. Ash Wednesday is the start of Lent. It occurs 46 days before Easter for the given year.
615  
616 =cut
617  
618 sub _determineAshWednesday {
619 565 ▶ my $easter = shift;
Subroutine _determineAshWednesday: called CC=1 SCAR=0.0
620  
621 565 my $ashWednesday = undef;
622  
623 try {
624 565 ▶ my $secondsToSubtract = 46 * ONE_DAY;
Subroutine __ANON__: called CC=1 SCAR=0.0
625 565 $ashWednesday = $easter - $secondsToSubtract;
626 565 return $ashWednesday;
627 }
628 catch {
629 0 ▶ confess "Could not calculate Ash Wednesday for Easter [" . $easter->ymd . "].";
Subroutine __ANON__: not called CC=1 SCAR=6.9
630 565 };
631 }
632  
633 =head2 _determineAscension
634  
635 Private method that takes the Time::Piece date for Easter and determines the date for Ascension. Ascension is forty days (inclusive) after Easter.
636  
637 =cut
638  
639 sub _determineAscension {
640 531 ▶ my $easter = shift;
Subroutine _determineAscension: called CC=1 SCAR=0.0
641  
642 531 my $ascension = undef;
643  
644 try {
645 531 ▶ my $secondsToAdd = 39 * ONE_DAY;
Subroutine __ANON__: called CC=1 SCAR=0.0
646 531 $ascension = $easter + $secondsToAdd;
647 531 return $ascension;
648 }
649 catch {
650 0 ▶ confess "Could not calculate Ascension for Easter [" . $easter->ymd . "].";
Subroutine __ANON__: not called CC=1 SCAR=6.9
651 531 };
652 }
653  
654 =head2 _determinePentecost
655  
656 Private method the takes the Time::Piece date for Easter and determines the date for Pentecost. Pentecost is fifty days (inclusive) after Easter.
657  
658 =cut
659  
660 sub _determinePentecost {
661 528 ▶ my $easter = shift;
Subroutine _determinePentecost: called CC=1 SCAR=0.0
662  
663 528 my $pentecost = undef;
664  
665 try {
666 528 ▶ my $secondsToAdd = 49 * ONE_DAY;
Subroutine __ANON__: called CC=1 SCAR=0.0
667 528 $pentecost = $easter + $secondsToAdd;
668 528 return $pentecost;
669 }
670 catch {
671 0 ▶ confess "Could not calculate Pentecost for Easter [" . $easter->ymd . "].";
Subroutine __ANON__: not called CC=1 SCAR=6.9
672 528 };
673 }
674  
675 =head2 _determineHolyWeek
676  
677 Private method used to return the names of various days within Holy Week. Takes the Time::Piece date given at construction and the Time::Piece date for Easter. Returns undef if the date given at construction is not found in Holy Week.
678  
679 =cut
680  
681 sub _determineHolyWeek {
682 562 ▶ my $date = shift;
Subroutine _determineHolyWeek: called CC=8 SCAR=20.8
683 562 my $easter = shift;
684  
685 562 my $dateMark = $easter - ONE_DAY;
686 562 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 3 559 562
687 3 return "Holy Saturday";
688 }
689  
690 559 $dateMark = $dateMark - ONE_DAY;
691 559 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 2 557 559
692 2 return "Good Friday";
693 }
694  
695 557 $dateMark = $dateMark - ONE_DAY;
696 557 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 2 555 557
697 2 return "Maundy Thursday";
698 }
699  
700 555 $dateMark = $dateMark - ONE_DAY;
701 555 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 2 553 555
702 2 return "Wednesday in Holy Week";
703 }
704  
705 553 $dateMark = $dateMark - ONE_DAY;
706 553 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 2 551 553
707 2 return "Tuesday in Holy Week";
708 }
709  
710 551 $dateMark = $dateMark - ONE_DAY;
711 551 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 2 549 551
712 2 return "Monday in Holy Week";
713 }
714  
715 549 $dateMark = $dateMark - ONE_DAY;
716 549 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 9 540 549
717 9 return "Palm Sunday";
718 }
719  
720 540 return undef;
721 }
722  
723 =head2 _determineEasterWeek
724  
725 Private method used to return the names of various days within Easter Week. Takes the Time::Piece date given at construction and the Time::Piece date for Easter. Returns undef if the date given at construction is not found in Easter Week.
726  
727 =cut
728  
729 sub _determineEasterWeek {
730 540 ▶ my $date = shift;
Subroutine _determineEasterWeek: called CC=7 SCAR=19.5
731 540 my $easter = shift;
732  
733 540 my $dateMark = $easter + ONE_DAY;
734 540 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 1 539 540
735 1 return "Monday of Easter Week";
736 }
737  
738 539 $dateMark = $dateMark + ONE_DAY;
739 539 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 4 535 539
740 4 return "Tuesday of Easter Week";
741 }
742  
743 535 $dateMark = $dateMark + ONE_DAY;
744 535 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 1 534 535
745 1 return "Wednesday of Easter Week";
746 }
747  
748 534 $dateMark = $dateMark + ONE_DAY;
749 534 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 1 533 534
750 1 return "Thursday of Easter Week";
751 }
752  
753 533 $dateMark = $dateMark + ONE_DAY;
754 533 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 1 532 533
755 1 return "Friday of Easter Week";
756 }
757  
758 532 $dateMark = $dateMark + ONE_DAY;
759 532 ▶ if ( $date == $dateMark ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMark) 1 531 532
760 1 return "Saturday of Easter Week";
761 }
762  
763 531 return undef;
764 }
765  
766 =head2 _hasChristmas2
767  
768 Private method to determine if there is a second Sunday of Christmas in the current liturgical year. Returns 1 when there is a second Sunday of Christmas and 0 otherwise.
769  
770 =cut
771  
772 sub _hasChristmas2 {
773 77 ▶ my $advent = shift;
Subroutine _hasChristmas2: called CC=2 SCAR=7.0
774 77 my $epiphany = shift;
775  
776 77 my $firstChristmas = nextSunday( $advent->fourthSunday );
777 77 my $dateMarker = nextSunday($firstChristmas);
778  
779 77 ▶ if ( $dateMarker < $epiphany ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($dateMarker < $epiphany) { } 65 12 77
780 65 return 1;
781 }
782 else {
783 12 return 0;
784 }
785  
786 0 return 0;
787 }
788  
789 =head2 _determineChristmasEpiphany
790  
791 Private method that matches the date given at construction against the Sundays in Christmastide and Epiphany. Returns a string representation of the name of the Sunday in the lectionary.
792  
793 =cut
794  
795 sub _determineChristmasEpiphany {
796 77 ▶ my $date = shift;
Subroutine _determineChristmasEpiphany: called CC=15 SCAR=27.1
797  
798 77 my $advent = shift;
799  
800 77 my $ashWednesday = shift;
801  
802 77 my $lectionary = shift;
803  
804 77 my $epiphany = Time::Piece->strptime( $date->year . "-01-06", "%Y-%m-%d" );
805  
806 77 my $christmas2 = _hasChristmas2( $advent, $epiphany );
807  
808 #Is the date in Christmastide?
809 77 my $dateMarker = nextSunday( $advent->fourthSunday );
810 77 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 6 71 77
811 6 return "The First Sunday of Christmas";
812 }
813  
814 71 $dateMarker = nextSunday($dateMarker);
815 71 ▶ if ( $date == $dateMarker && $christmas2 == 1 ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($date == $dateMarker and $christmas2 == 1) { } 6 65 71
elsif ($date == $dateMarker) { } 1 64 65
Condition100%3/3
$date == $dateMarker and $christmas2 == 1
!ll&&!rl&&r
6416
MC/DC100%2/2
$date == $dateMarker and $christmas2 == 1
$date == $dateMarker $christmas2 == 1
Truth table100%3/3
A and B
A= $date == $dateMarkerB= $christmas2 == 1
ABresult
0X0
100
111
816 6 return "The Second Sunday of Christmas";
817 }
818 elsif ( $date == $dateMarker ) {
819 1 return "The First Sunday of Epiphany";
820 }
821  
822 64 my @epiphanySundays = ( "The First Sunday of Epiphany", "The Second Sunday of Epiphany", "The Third Sunday of Epiphany", "The Fourth Sunday of Epiphany", "The Fifth Sunday of Epiphany", "The Sixth Sunday of Epiphany", "The Seventh Sunday of Epiphany", "The Last Sunday after Epiphany" );
823  
824 #Is the date in Epiphany?
825 64 my $sunCount = 0;
826 64 foreach my $sunday (@epiphanySundays) {
827 233 $dateMarker = nextSunday($dateMarker);
828 233 ▶ if ( $date == $dateMarker && $date == prevSunday($ashWednesday) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker and $date == prevSunday($ashWednesday)) 10 223 233
Condition100%3/3
$date == $dateMarker and $date == prevSunday($ashWednesday)
!ll&&!rl&&r
1695410
MC/DC100%2/2
$date == $dateMarker and $date == prevSunday($ashWednesday)
$date == $dateMarker $date == prevSunday($ashWednesday)
Truth table100%3/3
A and B
A= $date == $dateMarkerB= $date == prevSunday($ashWednesday)
ABresult
0X0
100
111
829 10 return "The Last Sunday after Epiphany";
830 }
831 223 ▶ if ( $date == $dateMarker && $date == prevSunday( prevSunday($ashWednesday) ) && $lectionary eq 'acna' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker and $date == prevSunday(prevSunday($ashWednesday)) and $lectionary eq "acna") 7 216 223
Condition100%6/6
$date == $dateMarker and $date == prevSunday(prevSunday($ashWednesday)) and $lectionary eq "acna"
!ll&&!rl&&r
21337
$date == $dateMarker and $date == prevSunday(prevSunday($ashWednesday))
!ll&&!rl&&r
1694410
MC/DC100%3/3
$date == $dateMarker and $date == prevSunday(prevSunday($ashWednesday)) and $lectionary eq "acna"
$date == $dateMarker $date == prevSunday(prevSunday($ashWednesday)) $lectionary eq "acna"
Truth table100%4/4
A and B and C
A= $date == $dateMarkerB= $date == prevSunday(prevSunday($ashWednesday))C= $lectionary eq "acna"
ABCresult
0XX0
10X0
1100
1111
832 7 return "The Second to Last Sunday after Epiphany";
833 }
834  
835 216 ▶ if ( $date == $dateMarker && $christmas2 == 1 ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($date == $dateMarker and $christmas2 == 1) { } 44 172 216
elsif ($date == $dateMarker and $christmas2 == 0) { } 3 338 341
Condition100%3/3
$date == $dateMarker and $christmas2 == 1
!ll&&!rl&&r
169344
MC/DC100%2/2
$date == $dateMarker and $christmas2 == 1
$date == $dateMarker $christmas2 == 1
Truth table100%3/3
A and B
A= $date == $dateMarkerB= $christmas2 == 1
ABresult
0X0
100
111
836 44 return $epiphanySundays[$sunCount];
837 }
838 ▶ elsif ( $date == $dateMarker && $christmas2 == 0 ) {
Condition66%2/3
$date == $dateMarker and $christmas2 == 0
!ll&&!rl&&r
16903
MC/DC50%1/2
$date == $dateMarker and $christmas2 == 0
$date == $dateMarker $christmas2 == 0
Truth table66%2/3
A and B
A= $date == $dateMarkerB= $christmas2 == 0
ABresult
0X0
100
111
839 3 return $epiphanySundays[ $sunCount + 1 ];
840 }
841  
842 169 $sunCount++;
843 }
844  
845 0 confess "There are no further Sundays of Christmastide or Epiphany.";
846 }
847  
848 =head2 _determineLent
849  
850 Private method that matches the date given at construction against the Sundays in Lent. Returns a string representation of the name of the Sunday in the lectionary.
851  
852 =cut
853  
854 sub _determineLent {
855 46 ▶ my $date = shift;
Subroutine _determineLent: called CC=6 SCAR=17.9
856 46 my $ashWednesday = shift;
857  
858 46 my $dateMarker = nextSunday($ashWednesday);
859 46 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 10 36 46
860 10 return "The First Sunday in Lent";
861 }
862  
863 36 $dateMarker = nextSunday($dateMarker);
864 36 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 27 36
865 9 return "The Second Sunday in Lent";
866 }
867  
868 27 $dateMarker = nextSunday($dateMarker);
869 27 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 18 27
870 9 return "The Third Sunday in Lent";
871 }
872  
873 18 $dateMarker = nextSunday($dateMarker);
874 18 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 9 18
875 9 return "The Fourth Sunday in Lent";
876 }
877  
878 9 $dateMarker = nextSunday($dateMarker);
879 9 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 0 9
880 9 return "The Fifth Sunday in Lent";
881 }
882  
883 0 confess "There are no further Sundays in Lent";
884 }
885  
886 =head2 _determineEasterSeason
887  
888 Private method that matches the date given at construction against the Sundays in the Easter season. Returns a string representation of the name of the Sunday in the lectionary.
889  
890 =cut
891  
892 sub _determineEasterSeason {
893 56 ▶ my $date = shift;
Subroutine _determineEasterSeason: called CC=7 SCAR=19.5
894 56 my $easter = shift;
895  
896 56 my $dateMarker = nextSunday($easter);
897 56 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 47 56
898 9 return "The Second Sunday of Easter";
899 }
900  
901 47 $dateMarker = nextSunday($dateMarker);
902 47 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 38 47
903 9 return "The Third Sunday of Easter";
904 }
905  
906 38 $dateMarker = nextSunday($dateMarker);
907 38 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 11 27 38
908 11 return "The Fourth Sunday of Easter";
909 }
910  
911 27 $dateMarker = nextSunday($dateMarker);
912 27 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 18 27
913 9 return "The Fifth Sunday of Easter";
914 }
915  
916 18 $dateMarker = nextSunday($dateMarker);
917 18 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 9 18
918 9 return "The Sixth Sunday of Easter";
919 }
920  
921 9 $dateMarker = nextSunday($dateMarker);
922 9 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 0 9
923 9 return "The Sunday after Ascension Day";
924 }
925  
926 0 confess "There are no further Sundays of Easter for [" . $date->ymd . "].";
927 }
928  
929 =head2 _determineOrdinary
930  
931 Private method that matches the date given at construction against the Sundays in Ordinary time, e.g. Trinity Sunday and following Sundays. Returns a string representation of the name of the Sunday in the lectionary.
932  
933 =cut
934  
935 sub _determineOrdinary {
936 241 ▶ my $date = shift;
Subroutine _determineOrdinary: called CC=29 SCAR=33.7
937 241 my $pentecost = shift;
938  
939 241 my $trinitySunday = nextSunday($pentecost);
940 241 ▶ if ( $date == $trinitySunday ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $trinitySunday) 9 232 241
941 9 return "Trinity Sunday";
942 }
943  
944 232 my $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-05-25", "%Y-%m-%d" ) );
945 232 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 0 232 232
946 0 return "Ordinary 8";
947 }
948  
949 232 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-06-01", "%Y-%m-%d" ) );
950 232 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 3 229 232
951 3 return "Ordinary 9";
952 }
953  
954 229 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-06-08", "%Y-%m-%d" ) );
955 229 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 6 223 229
956 6 return "Ordinary 10";
957 }
958  
959 223 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-06-15", "%Y-%m-%d" ) );
960 223 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 214 223
961 9 return "Ordinary 11";
962 }
963  
964 214 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-06-22", "%Y-%m-%d" ) );
965 214 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 205 214
966 9 return "Ordinary 12";
967 }
968  
969 205 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-06-29", "%Y-%m-%d" ) );
970 205 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 196 205
971 9 return "Ordinary 13";
972 }
973  
974 196 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-07-06", "%Y-%m-%d" ) );
975 196 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 187 196
976 9 return "Ordinary 14";
977 }
978  
979 187 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-07-13", "%Y-%m-%d" ) );
980 187 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 178 187
981 9 return "Ordinary 15";
982 }
983  
984 178 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-07-20", "%Y-%m-%d" ) );
985 178 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 169 178
986 9 return "Ordinary 16";
987 }
988  
989 169 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-07-27", "%Y-%m-%d" ) );
990 169 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 160 169
991 9 return "Ordinary 17";
992 }
993  
994 160 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-08-03", "%Y-%m-%d" ) );
995 160 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 8 152 160
996 8 return "Ordinary 18";
997 }
998  
999 152 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-08-10", "%Y-%m-%d" ) );
1000 152 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 143 152
1001 9 return "Ordinary 19";
1002 }
1003  
1004 143 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-08-17", "%Y-%m-%d" ) );
1005 143 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 134 143
1006 9 return "Ordinary 20";
1007 }
1008  
1009 134 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-08-24", "%Y-%m-%d" ) );
1010 134 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 125 134
1011 9 return "Ordinary 21";
1012 }
1013  
1014 125 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-08-31", "%Y-%m-%d" ) );
1015 125 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 116 125
1016 9 return "Ordinary 22";
1017 }
1018  
1019 116 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-09-07", "%Y-%m-%d" ) );
1020 116 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 107 116
1021 9 return "Ordinary 23";
1022 }
1023  
1024 107 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-09-14", "%Y-%m-%d" ) );
1025 107 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 98 107
1026 9 return "Ordinary 24";
1027 }
1028  
1029 98 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-09-21", "%Y-%m-%d" ) );
1030 98 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 89 98
1031 9 return "Ordinary 25";
1032 }
1033  
1034 89 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-09-28", "%Y-%m-%d" ) );
1035 89 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 80 89
1036 9 return "Ordinary 26";
1037 }
1038  
1039 80 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-10-05", "%Y-%m-%d" ) );
1040 80 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 71 80
1041 9 return "Ordinary 27";
1042 }
1043  
1044 71 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-10-12", "%Y-%m-%d" ) );
1045 71 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 62 71
1046 9 return "Ordinary 28";
1047 }
1048  
1049 62 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-10-19", "%Y-%m-%d" ) );
1050 62 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 53 62
1051 9 return "Ordinary 29";
1052 }
1053  
1054 53 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-10-26", "%Y-%m-%d" ) );
1055 53 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 44 53
1056 9 return "Ordinary 30";
1057 }
1058  
1059 44 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-11-02", "%Y-%m-%d" ) );
1060 44 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 6 38 44
1061 6 return "Ordinary 31";
1062 }
1063  
1064 38 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-11-09", "%Y-%m-%d" ) );
1065 38 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 9 29 38
1066 9 return "Ordinary 32";
1067 }
1068  
1069 29 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-11-16", "%Y-%m-%d" ) );
1070 29 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 17 12 29
1071 17 return "Ordinary 33";
1072 }
1073  
1074 12 $dateMarker = closestSunday( Time::Piece->strptime( $pentecost->year . "-11-23", "%Y-%m-%d" ) );
1075 12 ▶ if ( $date == $dateMarker ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $dateMarker) 12 0 12
1076 12 return "Christ the King";
1077 }
1078  
1079 0 confess "There are no further Sundays of Ordinary Time.";
1080 }
1081  
1082 =head2 _determineDay
1083  
1084 Private method that takes the Time::Piece data given at construction and, using other private methods, determines the name of the Feast Day or Sunday in the lectionary. If the date given at construction is a fixed feast, that day will be returned. If the date given is a special feast -- e.g. Easter, Ash Wednesday, etc. -- or a Sunday the name of that day will be returned. If the date isn't a special feast or a Sunday the date represented as a string will be returned as the name with no associated readings.
1085  
1086 =cut
1087  
1088 sub _determineDay {
1089 613 ▶ my $date = shift;
Subroutine _determineDay: called CC=19 SCAR=29.4
1090 613 my $lectionary = shift;
1091 613 my $includeFeasts = shift;
1092  
1093 613 my $advent = shift;
1094 613 my $easter = shift;
1095  
1096 #Is the date in Advent?
1097 613 ▶ if ( $date == $advent->firstSunday ) {
Branch: 4 branches
BranchTrueFalseTotal
if ($date == $advent->firstSunday) { } 9 604 613
elsif ($date == $advent->secondSunday) { } 9 595 604
elsif ($date == $advent->thirdSunday) { } 9 586 595
elsif ($date == $advent->fourthSunday) { } 9 577 586
1098 9 return ( commonName => "The First Sunday in Advent", type => 'Sunday' );
1099 }
1100 elsif ( $date == $advent->secondSunday ) {
1101 return (
1102 9 commonName => "The Second Sunday in Advent",
1103 type => 'Sunday'
1104 );
1105 }
1106 elsif ( $date == $advent->thirdSunday ) {
1107 9 return ( commonName => "The Third Sunday in Advent", type => 'Sunday' );
1108 }
1109 elsif ( $date == $advent->fourthSunday ) {
1110 return (
1111 9 commonName => "The Fourth Sunday in Advent",
1112 type => 'Sunday'
1113 );
1114 }
1115  
1116 #Is the date Easter Sunday?
1117 577 ▶ if ( $date == $easter ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $easter) 12 565 577
1118 12 return ( commonName => "Easter Day", type => 'fixedFeast' );
1119 }
1120  
1121 #Determine when Ash Wednesday is
1122 565 my $ashWednesday = _determineAshWednesday($easter);
1123 565 ▶ if ( $date == $ashWednesday ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $ashWednesday) 3 562 565
1124 3 return ( commonName => "Ash Wednesday", type => 'fixedFeast' );
1125 }
1126  
1127 #Holy Week
1128 562 my $holyWeekDay = _determineHolyWeek( $date, $easter );
1129 562 ▶ if ($holyWeekDay) {
Branch: 1 branch
BranchTrueFalseTotal
if ($holyWeekDay) 22 540 562
1130 22 return ( commonName => $holyWeekDay, type => 'fixedFeast' );
1131 }
1132  
1133 #Easter Week
1134 540 my $easterWeekDay = _determineEasterWeek( $date, $easter );
1135 540 ▶ if ($easterWeekDay) {
Branch: 1 branch
BranchTrueFalseTotal
if ($easterWeekDay) 9 531 540
1136 9 return ( commonName => $easterWeekDay, type => 'fixedFeast' );
1137 }
1138  
1139 #Ascension is 40 days after Easter
1140 531 my $ascension = _determineAscension($easter);
1141 531 ▶ if ( $date == $ascension ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $ascension) 3 528 531
1142 3 return ( commonName => "Ascension Day", type => 'fixedFeast' );
1143 }
1144  
1145 #Pentecost is 50 days after Easter
1146 528 my $pentecost = _determinePentecost($easter);
1147 528 ▶ if ( $date == $pentecost ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date == $pentecost) 12 516 528
1148 12 return ( commonName => "Pentecost", type => 'fixedFeast' );
1149 }
1150  
1151 #Feast Day Celebrations
1152 516 ▶ if ( $includeFeasts eq 'yes' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($includeFeasts eq "yes") 515 1 516
1153 515 my %feastDay = _determineFeasts( $date, $lectionary );
1154 515 ▶ if ( $feastDay{commonName} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($feastDay{"commonName"}) 67 448 515
1155 67 return ( commonName => $feastDay{commonName}, type => $feastDay{type} );
1156 }
1157 }
1158  
1159 #If the date isn't a Sunday and we've determined it is not a fixed holiday
1160 #then there are no readings for that day.
1161 449 ▶ if ( $date->wday != 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date->wday != 1) 29 420 449
1162 return (
1163 29 commonName => $date->fullday . ', ' . $date->fullmonth . ' ' . $date->mday . ', ' . $date->year,
1164 type => 'noLect'
1165 );
1166 }
1167  
1168 #Sundays of the Liturgical Year
1169 420 ▶ if ( $date < $ashWednesday ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date < $ashWednesday) 77 343 420
1170 return (
1171 77 commonName => _determineChristmasEpiphany( $date, $advent, $ashWednesday, $lectionary ),
1172 type => 'Sunday'
1173 );
1174 }
1175  
1176 343 ▶ if ( $date < $easter ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date < $easter) 46 297 343
1177 return (
1178 46 commonName => _determineLent( $date, $ashWednesday ),
1179 type => 'Sunday'
1180 );
1181 }
1182  
1183 297 ▶ if ( $date > $easter && $date < $pentecost ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date > $easter and $date < $pentecost) 56 241 297
Condition66%2/3
$date > $easter and $date < $pentecost
!ll&&!rl&&r
024156
MC/DC50%1/2
$date > $easter and $date < $pentecost
$date > $easter $date < $pentecost
Truth table66%2/3
A and B
A= $date > $easterB= $date < $pentecost
ABresult
0X0
100
111
1184 return (
1185 56 commonName => _determineEasterSeason( $date, $easter ),
1186 type => 'Sunday'
1187 );
1188 }
1189  
1190 241 ▶ if ( $date > $pentecost ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date > $pentecost) 241 0 241
1191 return (
1192 241 commonName => _determineOrdinary( $date, $pentecost ),
1193 type => 'Sunday'
1194 );
1195 }
1196 }
1197  
1198 =head1 AUTHOR
1199  
1200 Michael Wayne Arnold, C<< <michael at rnold.info> >>
1201  
1202 =head1 BUGS
1203  
1204 Please report any bugs or feature requests to C<bug-date-lectionary at rt.cpan.org>, or through
1205 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Date-Lectionary-Day>. I will be notified, and then you'll
1206 automatically be notified of progress on your bug as I make changes.
1207  
1208 =head1 SUPPORT
1209  
1210 You can find documentation for this module with the perldoc command.
1211  
1212 perldoc Date::Lectionary::Day
1213  
1214  
1215 You can also look for information at:
1216  
1217 =over 4
1218  
1219 =item * RT: CPAN's request tracker (report bugs here)
1220  
1221 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Date-Lectionary-Day>
1222  
1223 =item * AnnoCPAN: Annotated CPAN documentation
1224  
1225 L<http://annocpan.org/dist/Date-Lectionary-Day>
1226  
1227 =item * CPAN Ratings
1228  
1229 L<http://cpanratings.perl.org/d/Date-Lectionary-Day>
1230  
1231 =item * Search CPAN
1232  
1233 L<http://search.cpan.org/dist/Date-Lectionary-Day/>
1234  
1235 =back
1236  
1237 =head1 ACKNOWLEDGEMENTS
1238  
1239 Many thanks to my beautiful wife, Jennifer, my amazing daughter, Rosemary, and my sweet son, Oliver. But, above all, SOLI DEO GLORIA!
1240  
1241 =head1 LICENSE
1242  
1243 Copyright 2016-2018 MICHAEL WAYNE ARNOLD
1244  
1245 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1246  
1247 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1248  
1249 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
1250  
1251 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1252  
1253  
1254 =cut
1255  
1256 9 __PACKAGE__->meta->make_immutable;
1257  
1258 9 1; # End of Date::Lectionary::Day
↑ Summary Lectionary/Year.pm »