Skip to content

v.1.0.2

Latest
Compare
Choose a tag to compare
@julioserpone julioserpone released this 20 Oct 20:52
· 2 commits to main since this release
f36849d

Improvements to the time range assignment process

CarbonPeriod class to take into account the endDate if it has a time in H:i:s less than the starDate time:

Example:
Scenery -> Assigning the following schedule...
SLASchedule::create()->from('08:00:00')->to('17:00:00')->everyDay()

With the following dates:
start_date = 2022-10-18 16:00:00 (Y-m-d H:i:s)
now = 2022-10-19 08:00:01 (Y-m-d H:i:s)

Without this fix, CarbonPeriod may omit the end_date because the time on that day is less than the time on the start date. The value returned in this scenario would be 1 hour.

Now, CarbonPeriod will fully assume the end date but considering that the time to be evaluated must be within the range defined in the calendar