A standalone DateTime library originally based off of Carbon
MIT License
Bot releases are visible (Hide)
Published by othercorey 2 months ago
Full Changelog: https://github.com/cakephp/chronos/compare/2.4.4...2.4.5
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.Full Changelog: https://github.com/cakephp/chronos/compare/3.0.4...3.1.0
Published by markstory 11 months ago
Full Changelog: https://github.com/cakephp/chronos/compare/2.4.3...2.4.4
Published by othercorey about 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/3.0.3...3.0.4
Published by othercorey about 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/2.4.2...2.4.3
Published by markstory about 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/2.4.1...2.4.2
Published by dereuromark about 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/3.0.2...3.0.3
Published by markstory about 1 year ago
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: https://github.com/cakephp/chronos/issues/410#issuecomment-1722185717
toDateTimeImmutable()
by @othercorey in https://github.com/cakephp/chronos/pull/424 and https://github.com/cakephp/chronos/pull/427
Full Changelog: https://github.com/cakephp/chronos/compare/3.0.1...3.0.2
Published by othercorey about 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/2.4.0...2.4.1
Published by othercorey about 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/3.0.0...3.0.1
Published by othercorey about 1 year ago
Date
was renamed to ChronosDate
and will be dropped in 3.0MutableDate
and MutableDateTime
were deprecated and will be removed in 3.0Full Changelog: https://github.com/cakephp/chronos/compare/2.3.3...2.4.0
Published by othercorey about 1 year ago
ChronosTime
was added which supports parsing strings and conversion from Chronos
and DateTimeInterface
Chronos
and ChronosDate
no longer extend DateTimeImmutable
and no longer implement ChronosInterface
or DateTimeInterface
MutableDateTime
and MutableData
were droppedPublished by othercorey over 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/3.0.0-beta2...3.0.0-beta3
Published by othercorey over 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/2.3.2...2.3.3
Published by markstory over 1 year ago
Full Changelog: https://github.com/cakephp/chronos/compare/3.0.0-beta1...3.0.0-beta2
Published by markstory over 1 year ago
Chronos 2.4.0 will be backwards compatible with the rest of Chronos 2.x. However, 2.4.0 will introduce deprecations to the mutable classes and many methods in preparation for the changes coming in Chronos 3. The upgrade guide has more information on the upcoming changes and how to update your application.
Published by markstory almost 2 years ago
Chronos 2.4.0 will be backwards compatible with the rest of Chronos 2.x. However, 2.4.0 will introduce deprecations to the mutable classes and many methods in preparation for the changes coming in Chronos 3. The upgrade guide has more information on the upcoming changes and how to update your application.
Published by markstory almost 2 years ago
Chronos 3.0 will be a major release that contains breaking changes. This beta release provides a preview release of what will be coming in the future and unblocks CakePHP 5.0 beta releases.
ChronosDate
no longer implements DateTimeInterface
and doesn't share types with Chronos
either. This resolves a long standing interface compatibility issue where Date
and DateTime
objects appeared to be more type compatible than they should be.Chronos
no longer implements DateTimeInterface
or extends DateTimeImmutable
. Instead Chronos
is a wrapper around PHP's datetime, and continues to offer a similar interface to the PHP objects.In the future 2.4 will be released with deprecations to help with upgrading to chronos 3.x
Published by othercorey almost 2 years ago
Full Changelog: https://github.com/cakephp/chronos/compare/2.3.1...2.3.2
Published by othercorey almost 2 years ago