Releases: cakephp/chronos
Releases · cakephp/chronos
Chronos 3.5.0
Improvements
-
Added DST-safe elapsed time arithmetic methods that use Unix timestamp manipulation instead of wall clock time:
addElapsedHours()/subElapsedHours()addElapsedMinutes()/subElapsedMinutes()addElapsedSeconds()/subElapsedSeconds()
These methods ensure correct behavior across DST transitions and are true inverses of
diffInHours(),diffInMinutes(), anddiffInSeconds().
Full Changelog: 3.4.0...3.5.0
Chronos 3.4.0
What's Changed
- Add withTestNow() for scoped time mocking by @dereuromark in #498
- Add startOfHour() and endOfHour() methods to ChronosTime by @dereuromark in #508
- Add shiftTimezone() method to Chronos by @dereuromark in #507
- Add toArray() method to Chronos, ChronosDate, and ChronosTime by @dereuromark in #506
- Add time comparison methods to ChronosTime by @dereuromark in #505
- Add nextOccurrenceOf() and previousOccurrenceOf() methods by @dereuromark in #496
Full Changelog: 3.3.3...3.4.0
Chronos 3.3.3
What's Changed
Bug Fixes
- Fix regression in 3.3.2: createFromFormat() with Unix timestamp format ('U') incorrectly applying testNow, reverted due to BC break - #503
Full Changelog: 3.3.2...3.3.3
Chronos 3.3.2
What's Changed
Bug Fixes
- Fix createFromFormat to respect setTestNow for missing components by @dereuromark in #494
- Prevent infinite loops from zero-interval DatePeriods by @dereuromark in #499
Full Changelog: 3.3.1...3.3.2
Chronos 3.3.1
Chronos 3.3.0
What's Changed
- Split out toQuarterRange() for cleaner return API. by @dereuromark in #479
- Add toRfc7231String() helper by @othercorey in #484
Full Changelog: 3.2.0...3.3.0
Chronos 2.5.2
What's Changed
- Fix createFromTimestamp() deprecation message by @othercorey in #485
Full Changelog: 2.5.1...2.5.2
Chronos 3.2.0
What's Changed
- Add ChronosPeriod which returns Chronos instances from DatePeriod by @othercorey in #472
- Add ChronosDatePeriod which returns ChronosDate instances from DatePeriod by @othercorey in #476
New Contributors
- @MolbioUnige made their first contribution in #462
Full Changelog: 3.1.0...3.2.0
Chronos 2.5.1
This release requires PHP 8.4 to match the signature of DateTimeImmutable::createFromTimestamp(). Users not running PHP 8.4+ do not need this version.
What's Changed
- Allow float timestamp for createFromTimestamp() to match php by @othercorey in #474
- Require PHP 8.4 for createFromTimestamp() siganture by @othercorey in #475
Full Changelog: 2.4.5...2.5.1
Chronos 2.4.5
What's Changed
- Added replacement suggestions for some deprecated functions by @Staubiii in #458
- Fix deprecations from internals for Date by @markstory in #459
- Fix wrong return types by @Harfusha in #460
New Contributors
- @Apisathan made their first contribution in #450
- @Staubiii made their first contribution in #458
- @Harfusha made their first contribution in #460
Full Changelog: 2.4.4...2.4.5