-
Notifications
You must be signed in to change notification settings - Fork 64
2.x changelog draft
Mark Story edited this page Nov 24, 2019
·
4 revisions
Draft notes for the 2.0.0 release notes of Chronos
- 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
.
- 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()
.