Comments (4)
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.
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.
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.
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)
- Installing through composer HOT 2
- Prefer modern DateTime implementations HOT 1
- Feature request: serialize/deserialize HOT 5
- Accept DatePeriods as holidays HOT 11
- Get closest nth business day HOT 5
- Docblocks HOT 1
- Add editorconfig HOT 1
- Working day interval manipulation HOT 2
- Holidays::addHolidays is private HOT 3
- Calculate "Business Minutes" between two datetimes HOT 2
- Provide an example (or implementation) of 24/7 working time. HOT 1
- HALF BUSINESS DAY ADDITION HOT 2
- Get closest closing time HOT 4
- Calculer la durée écoulée entre deux dates HOT 2
- Case saturday or sunday as working day
- Arithmetic using business hours... HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from business.