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

Original dates for observed days #58

Open
jbroudou opened this issue Apr 22, 2020 · 2 comments
Open

Original dates for observed days #58

jbroudou opened this issue Apr 22, 2020 · 2 comments

Comments

@jbroudou
Copy link

jbroudou commented Apr 22, 2020

When an observed day (i.e. holidays that are moved because they are on a weekend) is returned would it possible to return the original date as well?

Also, in some locations when a holiday falls on a weekend, it is moved to a weekday as an observed day. In some of these locations only the observed day is considered a holiday whereas in others both the observed and original days are considered holidays. This is an important distinction in some jurisdictions.

Is there any chance of supporting an additional flag against observed holidays that indicate the original day is or isn't a holiday?

@kaoru
Copy link
Collaborator

kaoru commented Apr 22, 2020

hi @jbroudou,

This is certainly an interesting idea! I think it's something we could probably add to the spec.

We already have the currently unused public_holiday: true on every holiday. My original intention with that was that we could have other significant dates, like Saints days which aren't public holidays, but so far we've not included any of them (because they're not actually that relevant to our particular use case.)

So one way we could handle your suggestion would by be using that... we could have:

  - public_holiday: false
    date: '2017-01-01'
    names:
      en: New Year's Day
  - public_holiday: true
    date: '2017-01-02'
    names:
      en: New Year's Day (observed)

Without adding anything to the spec.

Alternatively, if you wanted them to actually be linked, I think it would be something like:

  - public_holiday: true
    date: '2017-01-01'
    observed_date: '2017-01-02'
    names:
      en: New Year's Day

Maybe?

What's your use case?

@jbroudou
Copy link
Author

Hi @kaoru Although it would require changing the spec, I think the link method is explicit and would be less prone to errors especially when you factor in non English translations.

- public_holiday: true
    date: '2017-01-01'
    observed_date: '2017-01-02'
    names:
      en: New Year's Day

regarding the second part of my question, as an example see

https://www.industrialrelations.nsw.gov.au/public-holidays/public-holidays-in-nsw/

2 The public holiday standard in the Public Holidays Act 2010 provides that when Australia Day (26 January) falls on a Saturday or Sunday, there will be no public holiday on that day and instead the following Monday is to be the public holiday.

3 The public holiday standard in the Act provides that when New Year's Day, Christmas Day or Boxing Day falls on a Saturday or Sunday there is to be an additional public holiday on the following Monday or Tuesday.

It seems like public_holiday could be used to identify if the original date is a holiday.

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

No branches or pull requests

2 participants