chronos

A standalone DateTime library originally based off of Carbon

MIT License

Downloads
38.5M
Stars
1.4K
Committers
63

Bot releases are visible (Hide)

chronos - Chronos 2.3.0

Published by othercorey about 3 years ago

Changes

  • Added missing microsecond() setter.
chronos - Chronos 2.2.0

Published by othercorey over 3 years ago

Changes

chronos - Chronos 2.1.2

Published by othercorey over 3 years ago

Changes

  • Fixed missing integer timestamp support in Chronos + MutableDateTime constructors
  • Fixed comparing from wrong source timezone in diffInMonthIgnoreTimezone()
chronos - Chronos 2.1.1

Published by othercorey over 3 years ago

Changes

  • Cleaned up diffInMonthsIgnoreTimezone()
chronos - Chronos 2.1.0

Published by othercorey over 3 years ago

New Features

  • Added diffInMonthsIgnoreTimezone() that takes the difference without allowing PHP to convert back to UTC first. For example: 2019-06-01 Asia/Tokyo and 2019-10-01 Asia/Tokyo would return 4 instead of 3 that DateTime::diff() would return.
chronos - Chronos 2.0.6

Published by othercorey about 4 years ago

Changes

  • Changed Date::createFromFormat() to workaround PHP 8 bug.
chronos - Chronos 2.0.5

Published by markstory over 4 years ago

Fixed

  • Values in the Ymd format can now be parsed.
  • Fixed creating Chronos/MutableDateTime from existing instance.
  • Removed remaining HHVM references.
chronos - Chronos 2.0.4

Published by markstory over 4 years ago

Fixes

  • Moved test cases to match other CakePHP projects
  • Improved performance of diffInMonths(), diffInYears() and diffInDays().
chronos - Chronos 2.0.3

Published by markstory over 4 years ago

  • Fix 'alias already defined' errors caused by preloading in PHP7.4
  • Added dayOfWeekName magic property.
chronos - Chronos 2.0.2

Published by markstory over 4 years ago

Changes

  • Updated dev dependencies to stable versions.
  • Removed duplicate content in README.
  • You can now new instances of Chronos, MutableDateTime, Date, MutableDate from other instances.
chronos - Chronos 2.0.1

Published by markstory almost 5 years ago

Fixes

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

Published by markstory almost 5 years ago

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 - Chronos 1.3.0

Published by markstory almost 5 years ago

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 - Chronos 1.2.8

Published by markstory over 5 years ago

  • Additional fixes for relative time parsing with test now instances.
chronos - Chronos 1.2.7

Published by markstory over 5 years ago

  • Improved documentation links
  • Fixed regression in parse() with relative times that was introduced in 1.2.6
chronos - Chronos 1.2.6

Published by markstory over 5 years ago

  • Documentation now included in this repository.
  • testNow() is now used when parsing relative datetimes that only supply the time component.
chronos - Chronos 1.2.5

Published by markstory over 5 years ago

  • Fix maxValue and minValue not working when timezone is not UTC.
  • Slim down zipball archives.
chronos - Chronos 1.2.4

Published by markstory over 5 years ago

  • Improved compatibility of __debugInfo methods with IDE debugging.
chronos - Chronos 1.2.3

Published by markstory almost 6 years ago

  • Carbon aliases are no longer set if Carbon is also installed.
chronos - Chronos 1.2.2

Published by markstory over 6 years ago

  • Fix typing issues that cause errors under strict_types in php 7.1+