GithubHelp home page GithubHelp logo

Comments (4)

commenthol avatar commenthol commented on August 16, 2024

Hi,
I think the expected result depends on how public holidays are perceived.
For your example I strongly believe that the public will celebrate New Year on January 1st.
As this falls 2022 on a Saturday (where people usually have a day off) the legislative moves the day-off from a non-working to a working day.
Calendars on the Internet do the same. https://www.timeanddate.com/holidays/australia/

from date-holidays-parser.

flowt-au avatar flowt-au commented on August 16, 2024

Hi, and thanks for your quick reply.

I agree people will celebrate on Jan 1st. :-) And generally only if they normally do not work on Saturdays. In Australia, with a highly casualised workforce, Saturdays are often normal work days. And yes, it depends upon what one means by "Public Holiday".

Since the Public Holiday / Day off is, as the rules say, on Monday in 2022, it would be great to have an option that flags the "Day off" ie Monday, where the rules say that is a holiday. So for 2022/23 return both records as now, but Mon 3rd/2nd is flagged as the "day off" and in years where Jan 1st falls on a weekday, that Jan 1st would be flagged as the "day off".

The timeanddate link you sent correctly identifies the Monday as a "Day off", so a flag on the returned record that indicated that would be really helpful and I can adjust the displayed text if there are 2 records depending on how I need to use it.

I currently parse the returned records looking for "duplicates" and remove the redundant one, but since your functions are determining that anyway a boolean on the record would be simpler.

Thanks again for your work and for your consideration,
Murray

from date-holidays-parser.

commenthol avatar commenthol commented on August 16, 2024

Hi @flowt-au,
Now I got your point. Yes for substitute days there should be a substitute flag being set. This is missing for this particular case.
Will reopen as a bug.

from date-holidays-parser.

flowt-au avatar flowt-au commented on August 16, 2024

Thanks so much! That will simplify things on my side. :-)
Go well,
Murray

from date-holidays-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.