Skip to content

Releases: spatie/opening-hours

4.0.0

26 Jun 08:01
48b4532
Compare
Choose a tag to compare

What's Changed

  • Replace getData() with readonly property ->data
  • Added isAlwaysOpen() and isAlwaysClosed() methods
  • Converted Day to an enum
  • Made Time and TimeRange readonly
  • Support OpeningHoursSpecification structured data for creating OpeningHours by @ambroisemaupate in #232
  • Improve createFromStructuredData() by @kylekatarnls in #237
  • Update PHPUnit from 10 to 11 and multiple testing tools by @Chris53897 in #246 #245 #244
  • Check both start and end to consider a range before/after by @kylekatarnls in #251
  • Drop PHP < 8.2

New Contributors

Full Changelog: 3.0.0...4.0.0

3.0.0

12 Nov 10:29
67ebe77
Compare
Choose a tag to compare
  • Add Time::date() method
  • Add DateTimeRange class
  • Add ranges support via to or - separator
  • Deprecate fill() and setData()
  • Remove setFilters()
  • Drop PHP < 7.4

2.41.0: Cap holidays check to end date when calculating diff

12 Jun 19:56
2113e28
Compare
Choose a tag to compare

Cap holidays check to end date when calculating diff

2.13.0: Make comparison microsecond-precise

07 Aug 15:48
befffe9
Compare
Choose a tag to compare

Make comparison microsecond-precise

2.12.0: Apply timezone for all methods and both input/output

24 Jul 15:17
3ef6eb8
Compare
Choose a tag to compare

Apply timezone for all methods and both input/output

2.11.3: Copy non immutable dates to apply timezone

23 Jul 16:02
bce146a
Compare
Choose a tag to compare

Copy non immutable dates to apply timezone

2.11.2: Add array-shape create() PHPDoc

09 Dec 10:17
e3ba90f
Compare
Choose a tag to compare

Add array-shape create() PHPDoc

2.11.1: Fix compatibility with PHP 8.1

04 Dec 17:11
693149d
Compare
Choose a tag to compare

2.11.0: Add dateTimeClass option to use other class for date objects

16 Oct 15:39
6a86c24
Compare
Choose a tag to compare

Add dateTimeClass option to use other class for date objects

2.10.1: Fix "hours" merge in mergeOverlappingRanges

10 Dec 22:37
b1f6561
Compare
Choose a tag to compare

mergeOverlappingRanges now properly handle hours for each hour or encapsulating a list of hours.