Git Product home page Git Product logo

Comments (4)

florianv avatar florianv commented on August 27, 2024

5AM is not Thursday anymore so your day definition is incorrect. The correct definition is:

new Day(Days::TUESDAY, [['21:00', '00:00']])
new Day(Days::WEDNESDAY, [['00:00', '05:00']])

from business.

eabay avatar eabay commented on August 27, 2024

Thank you for this great library!

I had the same issue although I'm doing what you suggested.

new Day(Days::TUESDAY, [["10:00", "00:00"]])
new Day(Days::WEDNESDAY, [["10:00", "00:00"]])

And got:

InvalidArgumentException in TimeInterval.php line 38:
The opening time "10:00:00" must be before the closing time "00:00:00".

I should be doing something wrong...

from business.

florianv avatar florianv commented on August 27, 2024

Hey,

thank you :)

I think you have to setup your times like so as 00:00 is considered to be the next day

new Day(Days::TUESDAY, [["10:00", "23:59:59"]])
new Day(Days::WEDNESDAY, [["10:00", "23:59:59"]])

from business.

eabay avatar eabay commented on August 27, 2024

And thanks for the fast reply :)

This is exactly what I am doing right now but it doesn't feel right while working with a reservation system which has time slots to be booked and I have to use workarounds for the last slot, 23:00-00:00.

I wish 24:00 would programatically be considered within the day instead of next day :)

from business.

Related Issues (17)

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.