A standalone DateTime library originally based off of Carbon
MIT License
Bot releases are visible (Hide)
Published by othercorey about 3 years ago
microsecond()
setter.Published by othercorey over 3 years ago
ReturnTypeWillChange
attribute. https://wiki.php.net/rfc/internal_method_return_types
Published by othercorey over 3 years ago
Chronos
+ MutableDateTime
constructorsdiffInMonthIgnoreTimezone()
Published by othercorey over 3 years ago
Published by othercorey over 3 years ago
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.Published by othercorey about 4 years ago
Published by markstory over 4 years ago
Ymd
format can now be parsed.Published by markstory over 4 years ago
diffInMonths()
, diffInYears()
and diffInDays()
.Published by markstory over 4 years ago
dayOfWeekName
magic property.Published by markstory over 4 years ago
new
instances of Chronos, MutableDateTime, Date, MutableDate from other instances.Published by markstory almost 5 years ago
Published by markstory almost 5 years ago
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.addYears()
no longer overflows months. For example adding (new Chronos('2012-02-29'))->addYears(1);
Results in 2013-02-28
not 2013-03-01
.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.addYearsWithOverflow()
to retain backwards compatibility with the previous behavior of addYears()
.createFromArray()
to ease creating instances from array data.Published by markstory almost 5 years ago
createFromArray()
was added to make creating instances from array based data.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.Published by markstory over 5 years ago
Published by markstory over 5 years ago
Published by markstory over 5 years ago
testNow()
is now used when parsing relative datetimes that only supply the time component.Published by markstory over 5 years ago
Published by markstory over 5 years ago
__debugInfo
methods with IDE debugging.Published by markstory almost 6 years ago
Published by markstory over 6 years ago