From 25886c64f8380e5614cfb91326ee2db7b487a259 Mon Sep 17 00:00:00 2001 From: FAJ-Munich <60485740+FAJ-Munich@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:48:24 +0100 Subject: [PATCH] Vespers on Dec 24 and 31 sort out Commemoration of IV Adventus and Dom infra 8vam Nat --- web/cgi-bin/DivinumOfficium/Date.pm | 8 +++++--- web/cgi-bin/horas/horascommon.pl | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web/cgi-bin/DivinumOfficium/Date.pm b/web/cgi-bin/DivinumOfficium/Date.pm index 1e643049291..c054d3fd98e 100644 --- a/web/cgi-bin/DivinumOfficium/Date.pm +++ b/web/cgi-bin/DivinumOfficium/Date.pm @@ -24,14 +24,16 @@ sub getweek { my $n; my $advent1 = getadvent($year); - + my $christmas = date_to_ydays(25, 12, $year); + my $tDay = $tomorrow ? $day+1 : $day; + #Advent in december if ($t >= $advent1) { - if ($t < ($advent1 + 28)) { + if ($t < $christmas) { $n = 1 + floor(($t - $advent1) / 7); if ($month == 11 || $day < 25) { return "Adv$n"; } } - return "Nat$day"; + return "Nat$tDay"; } if ($month == 1 && $day < 7) { diff --git a/web/cgi-bin/horas/horascommon.pl b/web/cgi-bin/horas/horascommon.pl index 7213dd42ced..42d666df06b 100644 --- a/web/cgi-bin/horas/horascommon.pl +++ b/web/cgi-bin/horas/horascommon.pl @@ -686,7 +686,8 @@ sub concurrence { $ccomrank = 0; } elsif ($rank < 2 # no 2nd Vespers of a Simplex || ($version =~ /196/ && $cwinner{Rank} =~ /Dominica/i && $rank < 5) # on any Sunday, nothing of a preceding III. cl feast - || (($crank >= 6 || $cwinner =~ /01-01/) && !($rank == 2.1 || $rank == 2.99 || $rank >= 4.2 ) && $cwrank[0] !~ /Dominica|feria|in.*octava/i) # in 1st Vespers of Duplex I. cl. only commemoration of Feria major, Dominica (major), 8va privilegiata and Duplex II./I. cl + || ($crank >= 6 && !($rank == 2.1 || $rank == 2.99 || $rank >= 4.2 ) && $cwrank[0] !~ /Dominica|feria|in.*octava/i) # in 1st Vespers of Duplex I. cl. only commemoration of Feria major, Dominica (major), 8va privilegiata and Duplex II./I. cl + || ($cwinner =~ /12-25|01-01/) # on Christmas Eve and New Year's Eve, nothing of a preceding Sunday || ($crank >= 5 && !($rank == 2.1 || $rank >= 2.99) && $cwrank[0] !~ /Dominica|feria|in.*octava/i)) { # in 1st Vespers of Duplex II. cl. also commemoration of any Duplex @dayname = @tomorrowname; $vespera = 1;