Giter Site home page Giter Site logo

holiday's People

Contributors

cinamo avatar marioquartz avatar tracer1337 avatar umulmrum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

holiday's Issues

"Corpus christi" (May 30 2024) is listed as "HolidayType Other" for Hesse, Germany

In https://github.com/umulmrum/holiday/blob/master/src/Provider/Germany/Hesse.php, "Corpus christi" is not listed as a proper "day off" for Hesse, which looks like a bug to me. Do you remember why it is listed as "Other" in Hesse, but not in the other states of Germany?

https://www.rv.hessenrecht.hessen.de/bshe/document/jlr-FeiertGHE1952rahmen is the official list of holidays provided by the state, and it lists the days in https://www.rv.hessenrecht.hessen.de/bshe/document/jlr-FeiertGHE1952pP1, where "Himmelfahrtstag" (the german name) is officially listed.

Enhancement Request: UK Holidays

While utilizing this library, I realised that support for tracking UK holidays is missing. To better cater to UK-based users, I propose the implementation of this feature in a future update.

btw: This PR potentially closes my issue.

Holidays not detected when providing time

On Oct 3 2019, I detected a small problem using your wonderful holiday detector: to avoid problems with the timezone, my code uses the following statement for checking for a holiday:

$today = new \DateTimeImmutable('today 13:00:00');
$holidayCalculator = new HolidayCalculator(new GermanyHolidayInitializer());
$holidayHelper     = new HolidayHelper($holidayCalculator);
$isAHoliday = $holidayHelper->isDayAHoliday($today, NorthRhineWestphalia::ID);

This does not return true, as the filtering process checks for a starting time of 00:00:00. I must admit that I haven't found a proper way to fix that bug in your code, that's why I haven't directly submitted a PR. But I would love to hear your opinion about this - do I use your code wrong or is this really a bug?

Invalid location alias: SUNDAYS when using HolidayHelper::getNoWorkDaysForTimespan()

Hi, nice library! On my first usage attempt, I get an error message, when I use HolidayHelper::getNoWorkDaysForTimespan():

$holidayCalculator = new HolidayCalculator(new GermanyHolidayInitializer())
$holidayHelper = new HolidayHelper($holidayCalculator);
$holidays = $holidayHelper->getNoWorkDaysForTimespan(
    new \DateTime('2018-10-01'),
    new \DateTime('2018-10-31'),
    'DE-NW'
);

This throws a HolidayException: "Invalid location alias: SUNDAYS".

The problem is, that I have to add (at least) Sundays as an HolidayProvider:

$holidayCalculator->addHolidayProvider(new Sundays());

This is a bit confusing. I expected the getNoWorkDaysForTimespan() method to add the provided $noWorkWeekdayProviders automatically using $holidayCalculator->addHolidayProvider();, if they are not added yet. This is already done in $temporaryHolidayCalculator, but the line calculating sundays doesn't make use of use it.

Is this a bug?

Greets, spackmat :)

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.