Skip to content

Releases: spatie/opening-hours

2.3.0: Fix overflow calculation

05 Jun 06:49
Compare
Choose a tag to compare

TimeRange no longer return true on containsTime for times overflowing next day
Overflow is now calculated at the day level (OpeningHoursForDay)
New methods:

OpeningHoursForDay::isOpenAtNight
TimeRange::overflowsNextDay

2.2.1: Fix overflow with simple ranges

04 Jun 15:55
1487462
Compare
Choose a tag to compare

Fix #111 overflow with simple ranges and add tests

2.2.0: Allow opening hours overflowing on the next day

07 May 09:40
e31ec7f
Compare
Choose a tag to compare

Allow opening hours overflowing on the next day by passing 'overflow' => true option in array definition

2.1.2: Set precise time bounds

14 Mar 14:57
3916f9a
Compare
Choose a tag to compare

Fix #98 Set precise time bounds

2.1.1: Handle hours/data in any order

22 Feb 12:06
Compare
Choose a tag to compare

Fix #95 Handle hours/data in any order

2.1.0: Handle consecutive ranges

18 Feb 08:10
4031753
Compare
Choose a tag to compare
  • Fixed #88 Opening hours across Midnight
  • Fixed #89 Data support for next open hours
  • Implemented #93 Enable PHP 8

2.1.0-beta.1: Handle consecutive ranges

15 Feb 11:00
4031753
Compare
Choose a tag to compare
Pre-release
  • Fixed #88 Opening hours across Midnight
  • Fixed #89 Data support for next open hours
  • Implemented #93 Enable PHP 8

2.0.0

13 Dec 07:54
f725af1
Compare
Choose a tag to compare
  • Added support for immutable dates
  • Allowed to add meta-data to global/exceptions config, days config, ranges settings via setData() and getData()
  • Allowed dynamic opening hours settings
  • Added TimeRange::fromArray() and TimeRange::fromDefinition() (to support array of hours+data or string[] or string)
  • Added setFilters() and getFilters()

⚠ Breaking changes:

  • nextOpen() and nextClose() return type changed for DateTimeInterface as it can now return DateTimeImmutable too
  • toDateTime() changed both input type and return type for DateTimeInterface as it can now take and return DateTimeImmutable too

2.0.0-beta.1

12 Dec 08:01
f725af1
Compare
Choose a tag to compare
2.0.0-beta.1 Pre-release
Pre-release
  • Added support for immutable dates
  • Allowed to add meta-data to global/exceptions config, days config, ranges settings via setData() and getData()
  • Allowed dynamic opening hours settings
  • Added TimeRange::fromArray() and TimeRange::fromDefinition() (to support array of hours+data or string[] or string)
  • Added setFilters() and getFilters()

⚠ Breaking changes:

  • nextOpen() and nextClose() return type changed for DateTimeInterface as it can now return DateTimeImmutable too
  • toDateTime() changed both input type and return type for DateTimeInterface as it can now take and return DateTimeImmutable too

1.9.0

07 Dec 11:19
Compare
Choose a tag to compare
  • Allow to merge overlapping hours #43
  • Fix nextOpen() and nextClose() consecutive calls #73