You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
Breaking Changes
PHP 7.2 required.
Date and MutableDate now use server default time zone instead of UTC. This makes using Date objects easier for time zones that are far away from UTC as Date::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 in 2013-02-28 not 2013-03-01.
New Features
Strict mode enabled for all files in chronos.
Add Chronos\DifferenceFormatterInterface.
Chronos::copy() returns a new instance now.
Date and MutableDate 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 of addYears().
Added createFromArray() to ease creating instances from array data.