SeitaBV / timely-beliefs

Model data as beliefs (at a certain time) about events (at a certain time).
MIT License
34 stars 6 forks source link

add `at_date_annually` knowledge horizon function #172

Closed victorgarcia98 closed 7 months ago

victorgarcia98 commented 7 months ago

Recently, we've encountered the case of beliefs that were known at a certain day and month, annually. This PR introduces a new knowledge horizon function which takes a day and a month as parameters and let's you define a date in which the event was known.

If it happens that the event_start is before the publication year at that year, we take the date of previous year as reference.

Regarding testing, I've covered DST and leap years.