Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanctorale and data files: delete a day's inherited contents #91

Open
igneus opened this issue Jun 24, 2022 · 1 comment
Open

Sanctorale and data files: delete a day's inherited contents #91

igneus opened this issue Jun 24, 2022 · 1 comment

Comments

@igneus
Copy link
Owner

igneus commented Jun 24, 2022

When layering sanctorale data files there are occasionally cases where we need to just delete contents of a day inherited from a parent file without replacing them with other celebrations.

Real-life example: in the General Roman Calendar on 14th February there is the memorial of Sts. Cyril and Methodius, but in Czech Republic and some other countries they are celebrated on another date and there is no sanctorale celebration on 14th February. When modelling the Czech calendar as a layer over the General Roman Calendar, we need to be able to specify on 14th February delete all content copied from the parent instance.

In the data file it will be written as a date entry with no content:

# with a month heading like this
= 2
14

# or with inline month like this
2/14

Internal representation in Sanctorale data structure and related changes to the behaviour of the public interface need to be thoroughly considered.

@igneus
Copy link
Owner Author

igneus commented Jun 24, 2022

At least for the particular use case mentioned above a sufficient alternative solution (not requiring a new entity "on day D let there be nothing" in Sanctorale internal data structure) would be, when a given Celebration symbol appears on another date, to delete the appearance inherited from the parent instance. But this could easily result in silent unexpected behaviour.

Also it could be argued that we need more versatile tools for calendar layering, like changing a celebration's date or modifying some of its properties (rank/colour/title) in the child calendar without having to repeat the whole day's entry. But I would prefer not to go down this path. The current data file layering logic is certainly not the DRYest one, but it's dead simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant