Skip to content

Add optional Nova Scotia holidays #135

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

Merged
merged 4 commits into from
Jul 12, 2024
Merged

Add optional Nova Scotia holidays #135

merged 4 commits into from
Jul 12, 2024

Conversation

pcraig3
Copy link
Owner

@pcraig3 pcraig3 commented Jul 12, 2024

There are a few changes in this PR

  1. Add optional NS holidays
  2. Change "Truth and Reconciliation Day" to "Orange Shirt Day" for Manitoba
  3. Fix a small bug that would get relative days wrong sometimes

Add optional NS holidays

I was asked to add in 'optional' holidays for NS, which seems to mean the "retail closing days" that are included on the NS website. Seems to be the same thing as optional holidays in other provinces, so let's ship them.

Change "Truth and Reconciliation Day" to "Orange Shirt Day" for Manitoba

Manitoba celebrates this holiday under a different name than the rest of Canada, and has also (since 2024) upgraded the status of this day to a legislated holiday, not an optional one.

  1. Fix a small bug that would get relative days wrong sometimes

Sometimes, when a holiday was on Saturday, it would say the observed date was on the Sunday, but this never happens. It's always on the next Monday. Due to what I am pretty sure was a timezone problem, some dates were being created as the 23:00 of the day before (eg, September 30 would be "12-29T23:00:00"). Since we don't care about the hours particularly, only the day, I figured an easy fix was to just add 1 hour to all dates to account for this weirdness.

pcraig3 added 4 commits July 12, 2024 09:11
Some of the dates were returning as 23:00 for some reason (I think
timezones), so I added an extra hour when I am coverting them in the
relative date function, so that it finds the correct times.
This was recently brought to my attention.

> I just wanted to flag an issue I noticed: as of this year, Manitoba celebrates Orange Shirt Day on September 30th (it's National Day for Truth and Reconciliation, but with a different name).

> I noticed that day was missing from the Manitoba data on your tool, so just wanted to reach out and let you know.

Correct! Updated.
Technically these are known as "Designated retail closing days",
but they seem to serve the same function as optional holidays.
@pcraig3 pcraig3 merged commit ae0b181 into main Jul 12, 2024
5 checks passed
@pcraig3 pcraig3 deleted the ns-optional branch July 12, 2024 13:40
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

Successfully merging this pull request may close these issues.

1 participant