Liturgical-Calendar / LiturgicalCalendarAPI

A PHP script / API endpoint that will generate the Roman Catholic liturgical calendar for any given year, calculating the mobile festivities and the precedence of solemnities, feasts, memorials...
Apache License 2.0
39 stars 11 forks source link

[Bug]: optional memorial of Mary showing on Saturdays of Christmas Time, Lent and Easter Time #179

Closed JohnRDOrazio closed 6 months ago

JohnRDOrazio commented 8 months ago

What happened?

On Saturdays of Christmas Time, Lent and Easter Time, the optional memorial of Mary is listed, but that's only possible during Ordinary Time

(feedback from Steven van Roode)

Version

dev (Edge)

Which browser or browsers are you seeing the problem on? (can select more than one, or N/A if not applicable)

N/A

Relevant error messages

No response

JohnRDOrazio commented 6 months ago

This will actually depend on knowing whether a given date is within a given liturgical season. So we should first implement issue #173.

JohnRDOrazio commented 6 months ago

Actually, we only need to test if the date is in Ordinary Time or not, and we already had that function in our FestivitiesCollection class. In any case other than applying a check such that only Saturdays within Ordinary Time will apply, I also moved the calculation to after applying National and Diocesan calendars. See commit https://github.com/Liturgical-Calendar/LiturgicalCalendarAPI/commit/925241da0bde2b6f532f217412f22867ca70bd41

Should I move it back before the Diocesan calendar is defined, so that it will sit alongside diocesan calendar data rather than be overwritten by Diocesan calendar data?

JohnRDOrazio commented 6 months ago

Seeing that all other calendar data is not generally overwritten by Diocesan calendar data, let's move it to right before Diocesan calendar data is defined. https://github.com/Liturgical-Calendar/LiturgicalCalendarAPI/commit/9346154a54ed00f79a4e2fe112bc7ccc99640fdb

However we should keep in mind that this might need to be redefined based on usage by dioceses etc.