Skip to content

Commit

Permalink
don't unset Advent1 until while still comparing against it
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Mar 25, 2024
1 parent 37de9a3 commit 3401c41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/FestivityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ public function purgeDataBeforeAdvent( int|null $buffer = null ) : void {
public function purgeDataAdventChristmas( int|null $buffer = null ) {
// the buffer should allow for
foreach( $this->festivities as $key => $festivity ) {
if( $festivity->date >= $this->festivities[ "Advent1" ]->date ) {
if( $festivity->date > $this->festivities[ "Advent1" ]->date ) {
unset( $this->festivities[ $key ] );
// make sure it isn't still contained in another collection
unset( $this->solemnities[ $key ] );
Expand All @@ -602,6 +602,8 @@ public function purgeDataAdventChristmas( int|null $buffer = null ) {
unset( $this->SolemnitiesLordBVM[ $key ] );
unset( $this->SundaysAdventLentEaster[ $key ] );
}
//lastly remove First Sunday of Advent
unset( $this->festivities[ "Advent1" ] );
/* Perhaps we shouldn't remove the Vigil Mass for the first Sunday of Advent?
// also remove the Vigil Mass for the first Sunday of Advent
if(
Expand Down

0 comments on commit 3401c41

Please sign in to comment.