Skip to content

Commit

Permalink
add more methods to FestivityCollection
Browse files Browse the repository at this point in the history
notInFeasts etc.
  • Loading branch information
JohnRDOrazio committed Feb 7, 2022
1 parent b3f567f commit a9e1760
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions includes/FestivityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,42 @@ public function inSolemnities( DateTime $date ) : bool {
return in_array( $date, $this->solemnities );
}

public function notInSolemnities( DateTime $date ) : bool {
return !$this->inSolemnities( $date );
}

public function inFeasts( DateTime $date ) : bool {
return in_array( $date, $this->feasts );
}

public function notInFeasts( DateTime $date ) : bool {
return !$this->inFeasts( $date );
}

public function inSolemnitiesOrFeasts( DateTime $date ) : bool {
return $this->inSolemnities( $date ) || $this->inFeasts( $date );
}

public function notInSolemnitiesOrFeasts( DateTime $date ) : bool {
return !$this->inSolemnitiesOrFeasts( $date );
}

public function inMemorials( DateTime $date ) : bool {
return in_array( $date, $this->memorials );
}

public function notInMemorials( DateTime $date ) : bool {
return !$this->inMemorials( $date );
}

public function inFeastsOrMemorials( DateTime $date ) : bool {
return $this->inFeasts( $date ) || $this->inMemorials( $date );
}

public function notInFeastsOrMemorials( DateTime $date ) : bool {
return !$this->inFeastsOrMemorials( $date );
}

public function inSolemnitiesFeastsOrMemorials( DateTime $date ) : bool {
return $this->inSolemnities( $date ) || $this->inFeastsOrMemorials( $date );
}
Expand Down

0 comments on commit a9e1760

Please sign in to comment.