Skip to content

Releases: cakephp/chronos

Chronos 2.0.1

01 Dec 01:35
Compare
Choose a tag to compare

Fixes

  • Features from 1.3.0 were merged in as they were accidentally omitted from the 2.0.0 release.

Chronos 2.0.0

30 Nov 03:28
f6bbc15
Compare
Choose a tag to compare

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.

Chronos 1.3.0

30 Nov 03:25
ba2bab9
Compare
Choose a tag to compare

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() and eq() are now aliases for the long form methods greaterThan and equals(). In the future we may deprecate and remove the short forms in order to increase readability of the API.

Chronos 1.2.8

17 Jun 15:19
0292f06
Compare
Choose a tag to compare
  • Additional fixes for relative time parsing with test now instances.

Chronos 1.2.7

11 Jun 13:57
c981a91
Compare
Choose a tag to compare
  • Improved documentation links
  • Fixed regression in parse() with relative times that was introduced in 1.2.6

Chronos 1.2.6

30 May 13:31
5af4766
Compare
Choose a tag to compare
  • Documentation now included in this repository.
  • testNow() is now used when parsing relative datetimes that only supply the time component.

Chronos 1.2.5

23 Apr 19:01
8a2b005
Compare
Choose a tag to compare
  • Fix maxValue and minValue not working when timezone is not UTC.
  • Slim down zipball archives.

Chronos 1.2.4

11 Feb 02:11
Compare
Choose a tag to compare
  • Improved compatibility of __debugInfo methods with IDE debugging.

Chronos 1.2.3

19 Oct 13:38
3951101
Compare
Choose a tag to compare
  • Carbon aliases are no longer set if Carbon is also installed.

Chronos 1.2.2

11 Jul 18:53
30f5b26
Compare
Choose a tag to compare
  • Fix typing issues that cause errors under strict_types in php 7.1+