Skip to content

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

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().
Clone this wiki locally