chronos

A standalone DateTime library originally based off of Carbon

MIT License

Downloads
38.5M
Stars
1.4K
Committers
63

Bot releases are hidden (Show)

chronos - Chronos 2.4.5

Published by othercorey 2 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/cakephp/chronos/compare/2.4.4...2.4.5

chronos - Chronos 3.1.0 Latest Release

Published by markstory 3 months ago

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: https://github.com/cakephp/chronos/compare/3.0.4...3.1.0

chronos - Chronos 2.4.4

Published by markstory 11 months ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/2.4.3...2.4.4

chronos - Chronos 3.0.4

Published by othercorey about 1 year ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/3.0.3...3.0.4

chronos - Chronos 2.4.3

Published by othercorey about 1 year ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/2.4.2...2.4.3

chronos - Chronos 2.4.2

Published by markstory about 1 year ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/2.4.1...2.4.2

chronos - Chronos 3.0.3

Published by dereuromark about 1 year ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/3.0.2...3.0.3

chronos - Chronos 3.0.2

Published by markstory about 1 year ago

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: https://github.com/cakephp/chronos/issues/410#issuecomment-1722185717

What's Changed

New Contributors

Full Changelog: https://github.com/cakephp/chronos/compare/3.0.1...3.0.2

chronos - Chronos 2.4.1

Published by othercorey about 1 year ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/2.4.0...2.4.1

chronos - Chronos 3.0.1

Published by othercorey about 1 year ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/3.0.0...3.0.1

chronos - Chronos 2.4.0

Published by othercorey about 1 year ago

Major Changes

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/2.3.3...2.4.0

chronos - Chronos 3.0.0

Published by othercorey about 1 year ago

Major Changes

  • 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 dropped
chronos - Chronos 3.0.0-beta3

Published by othercorey over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/cakephp/chronos/compare/3.0.0-beta2...3.0.0-beta3

chronos - Chronos 2.3.3

Published by othercorey over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/cakephp/chronos/compare/2.3.2...2.3.3

chronos - Chronos 3.0.0-beta2

Published by markstory over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/cakephp/chronos/compare/3.0.0-beta1...3.0.0-beta2

chronos - Chronos 2.4.0-RC2

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.

chronos - Chronos 2.4.0-RC1

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.

chronos - Chronos 3.0.0-beta1

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.

Summary of Breaking changes

  • Removed Mutable datetime and date classes.
  • 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.
  • Removed Carbon compatibility shims. While chronos started out as a fork of Carbon due to lack of maintainship, the Carbon project has new maintainers and we no longer need to encroach on that namespace.

Upgrading

In the future 2.4 will be released with deprecations to help with upgrading to chronos 3.x

chronos - Chronos 2.3.2

Published by othercorey almost 2 years ago

What's Changed

Full Changelog: https://github.com/cakephp/chronos/compare/2.3.1...2.3.2

chronos - Chronos 2.3.1

Published by othercorey almost 2 years ago

What's Changed

  • Fix passing negative value to sub helpers such as subYears(-1) for PHP 8.2