Skip to content

Releases: cakephp/chronos

Chronos 2.4.5

06 Aug 17:17
b0321ab
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.4.4...2.4.5

Chronos 3.1.0

21 Jul 23:50
786d69e
Compare
Choose a tag to compare

Behavior Changes

  • Chronos::createFromTimestamp()handles timezones differently. If $timezone is not explicitly passed then the instance has timezone set to +00:00 unlike earlier where the currently set default timezone was used. This behavior change normalizes behavior with changes in PHP 8.4 which adds a new DateTimeInterface::createFromTimestamp() method.

What's Changed

New Contributors

Full Changelog: 3.0.4...3.1.0

Chronos 2.4.4

14 Nov 16:30
03208c1
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.4.3...2.4.4

Chronos 3.0.4

18 Oct 02:31
9cb035a
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.3...3.0.4

Chronos 2.4.3

18 Oct 02:31
96f28dd
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.4.2...2.4.3

Chronos 2.4.2

12 Oct 14:19
79b58b7
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.4.1...2.4.2

Chronos 3.0.3

02 Oct 22:10
54164f6
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.2...3.0.3

Chronos 3.0.2

29 Sep 23:19
Compare
Choose a tag to compare

Summary

The Chronos class once again extends DateTimeImmutable and therefore implements DateTimeInterface. ChronosDate and ChronosTime do not. Several parameters were expanded to allow DateTimeInterface instead of requiring only Chronos objects.

After making the original changes in 3.0.0, we realized that the supported PHP versions (8.1+) do not have the original bugs that made extending DateTimeImmutable either problematic or impossible in the future.

ChronosDate is intended to be a separate object and will not extend DateTimeImmutable as it supports mutating time and time zones which is hard to support.

ChronosTime was never meant to extend DateTimeImmutable and is part of the reason why ChronosInterface was removed as it doesn't represent a true shared interface.

An explanation of the reason behind the 3.0 changes can be found here: #410 (comment)

What's Changed

  • Change only Chronos to extend DateTimeImmutable once again by @othercorey in #417
  • Support creating Chronos from ChronosTime by @othercorey in #425
  • Allow passing DatePeriod options to diffFiltered() by @othercorey in #429
  • Allow setting time zone when converting to DateTimeImmutable by @othercorey in #430
  • Add halfOfYear, isFirstHalfOfYear, IsSecondHalfOfYear; improve getter… by @brenoroosevelt in #421
  • Add third Parameter $others to farthest and closest Methods by @brenoroosevelt in #422
  • Align Chronos::getTimezone() return type with DateTimeImmutable by @othercorey in #423
  • Add toDateTimeImmutable() by @othercorey in #424 and #427
  • Fix casting to string for ChronosDate and ChronosTime. by @ADmad in #428
  • Remove ChronosInterface references and clean up ChronosDate and ChronosTime refs by @othercorey in #431

New Contributors

Full Changelog: 3.0.1...3.0.2

Chronos 2.4.1

12 Sep 03:13
dd58390
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.4.0...2.4.1

Chronos 3.0.1

09 Sep 03:48
a89857a
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.0...3.0.1