Releases: cakephp/chronos
Releases · cakephp/chronos
Chronos 2.0.1
Fixes
- Features from 1.3.0 were merged in as they were accidentally omitted from the 2.0.0 release.
Chronos 2.0.0
Breaking Changes
- PHP 7.2 required.
Date
andMutableDate
now use server default time zone instead of UTC. This makes using Date objects easier for time zones that are far away from UTC asDate::today()
will not be wrong as often.- Additional typehints added to methods.
addYears()
no longer overflows months. For example adding(new Chronos('2012-02-29'))->addYears(1);
Results in2013-02-28
not2013-03-01
.
New Features
- Strict mode enabled for all files in chronos.
- Add
Chronos\DifferenceFormatterInterface
. Chronos::copy()
returns a new instance now.Date
andMutableDate
constructor now allow time zones to be passed in. This allows you to take dates from other time zones. The default time zone is used if not specified.ChronosInterval
now supports microseconds.- Added
addYearsWithOverflow()
to retain backwards compatibility with the previous behavior ofaddYears()
. - Added
createFromArray()
to ease creating instances from array data.
Chronos 1.3.0
Added
createFromArray()
was added to make creating instances from array based data.- Improved documentation and Japanese translation.
Changes
- Improved compatiblity with PHP 7.4
- Shorthand comparison functions like
gt()
andeq()
are now aliases for the long form methodsgreaterThan
andequals()
. In the future we may deprecate and remove the short forms in order to increase readability of the API.
Chronos 1.2.8
- Additional fixes for relative time parsing with test now instances.
Chronos 1.2.7
- Improved documentation links
- Fixed regression in parse() with relative times that was introduced in 1.2.6
Chronos 1.2.6
- Documentation now included in this repository.
testNow()
is now used when parsing relative datetimes that only supply the time component.
Chronos 1.2.5
- Fix maxValue and minValue not working when timezone is not UTC.
- Slim down zipball archives.
Chronos 1.2.4
- Improved compatibility of
__debugInfo
methods with IDE debugging.
Chronos 1.2.3
- Carbon aliases are no longer set if Carbon is also installed.
Chronos 1.2.2
- Fix typing issues that cause errors under strict_types in php 7.1+