Releases: cakephp/chronos
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
Chronos 3.1.0
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 newDateTimeInterface::createFromTimestamp()
method.
What's Changed
- Improve exception messages by @dereuromark in #447
- Pluralize years and months in function by @andrewlavens in #448
- Provide PSR-20 Clock implementation by @odan in #443
- Run composer normalize over composer.json by @dereuromark in #449
- Allow phpunit 11 by @ADmad in #455
- Fix error on PHP 8.4 by @ADmad in #454
New Contributors
- @andrewlavens made their first contribution in #448
Full Changelog: 3.0.4...3.1.0
Chronos 2.4.4
What's Changed
- Fix off by one errors in diffFiltered by @markstory in #446
Full Changelog: 2.4.3...2.4.4
Chronos 3.0.4
What's Changed
- Add ChronosTime::endOfDay() by @othercorey in #439
- Add microseconds to Chronos::endOfDay() by @othercorey in #441
Full Changelog: 3.0.3...3.0.4
Chronos 2.4.3
What's Changed
- Add microseconds to Chronos::endOfDay() by @othercorey in #440
- Use ChronosDate in docs by @othercorey in #438
Full Changelog: 2.4.2...2.4.3
Chronos 2.4.2
What's Changed
- Fix "undefined array key" error. by @ADmad in #415
- Use phive to install phpstan by @markstory in #436
- Restore Date::create() compatibility with no params by @markstory in #435
Full Changelog: 2.4.1...2.4.2
Chronos 3.0.3
Chronos 3.0.2
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
- @brenoroosevelt made their first contribution in #421
Full Changelog: 3.0.1...3.0.2
Chronos 2.4.1
What's Changed
- Add missing default for ChronosInterface::now() by @othercorey in #412
Full Changelog: 2.4.0...2.4.1
Chronos 3.0.1
What's Changed
- Re-introduce Chronos::getLastErrors() by @othercorey in #409
Full Changelog: 3.0.0...3.0.1