1.33.0 / 2018-08-07

  • Added startOfSecond() method
  • Added endOfSecond() method
  • Added translations for az, bn, ca, es
  • Fixed sh plural
  • Fixed typing exception messages
  • Added support for closures in setToStringFormat

1.32.0 / 2018-07-05

  • Thrown an exception if start/end of week set to a value out of range
  • Added short units for pt_BR translation
  • Added one/two days diff wording for uk translation
  • Added period wording for uk, ca and oc translation

1.31.1 / 2018-06-26

  • Disabled locale auto-update with symfony/translation < 4

1.31.0 / 2018-06-24

  • Added executeWithLocale method
  • Added localization support checking methods: getAvailableLocales, localeHasShortUnits, localeHasDiffSyntax, localeHasDiffOneDayWords, localeHasDiffTwoDayWords, localeHasPeriodSyntax
  • Added automated synchronization with Laravel locale
  • Added/updated translations for my, fr, pt_BR

1.30.0 / 2018-06-15

  • Added CarbonPeriod skip method
  • Added calculated read-only properties englishDayOfWeek, shortEnglishDayOfWeek, englishMonth, shortEnglishMonth, localeDayOfWeek, shortLocaleDayOfWeek, localeMonth, shortLocaleMonth

1.29.2 / 2018-05-29

  • Added german now/tomorrow/yesterday translations
  • Added compareYearWithMonth and shouldCompareYearWithMonth

1.29.1 / 2018-05-29

  • Allowed to configure is(Same|Current)(Month|Quarter) behavior

1.29.0 / 2018-05-24

  • Added CarbonPeriod and related methods in Carbon and CarbonInterval

1.28.0 / 2018-05-22

  • Added isStartOfDay, isEndOfDay, isMidnight, isMidday methods
  • Added make methods to Carbon and CarbonInterval
  • Added workaround for timezone bug: https://bugs.php.net/bug.php?id=45528
  • Added cascading CarbonInterval and custom carry-over points
  • Added total method and total getters to CarbonInterval
  • Added macro support to CarbonInterval
  • Added invert method to CarbonInterval
  • Added $short argument to CarbonInterval::forHumans to display short formats
  • Added locales bs_BA, hi, is, ne, oc, sh, sw
  • Added diff translations for ca, es, nl, no, pl, sl, sr*
  • Fixed createFromFormat with partial format and mock now instance
  • Fixed ko, pl translations

1.27.0 / 2018-04-23

  • Added isSameQuarter, isCurrentQuarter, isNextQuarter and isLastQuarter methods
  • Added isSameHour, isSameMinute, isSameSecond, isCurrentHour, isCurrentMinute and isCurrentSecond methods
  • Added CarbonInterval::times method
  • Added italian translation for diff words

1.26.4 / 2018-04-17

  • Always pass $self at its position even if previous arguments miss

1.26.2 / 2018-04-16

  • Fixed Laravel's compatibility

1.26.1 / 2018-04-16

  • Fixed Laravel's compatibility

1.26.0 / 2018-04-16

  • Added setDateFrom and setTimeFrom methods
  • Allowed DateTimeInterface in instance method
  • Added macro, hasMacro and mixin methods
  • Added welsh language
  • Added CarbonInterval::getDateIntervalSpec (similar to CarbonInterval::spec but static and able to take any DateInterval instance as argument)
  • Added options for `diffForHumans` to support now/yesterday/tomorrow (see the doc.)

1.25.0 / 2018-03-20

  • Allowed date/time strings in diffIn* and diffForHumans methods
  • Added addRealHours()/addRealHour()/subRealHours()/subRealHour() method
  • Added addRealMinutes()/addRealMinute()/subRealMinutes()/subRealMinute() method
  • Added addRealSeconds()/addRealSecond()/subRealSeconds()/subRealSecond() method
  • Added diffInRealHours() method
  • Added diffInRealMinutes() method
  • Added diffInRealSeconds() method
  • Added Carbon::createFromTimeString() method
  • Added CarbonInterval::fromString() method
  • Allowed spec string as CarbonInterval constructor and in CarbonInterval::parse()
  • Added Carbon::useMicrosecondsFallback() and Carbon::isMicrosecondsFallbackEnabled() to handle microseconds work-around in PHP < 7.1
  • Added dayOfWeekIso property
  • Allowed editing/adding languages and translations

1.24.2 / 2018-03-09

  • Prevent from negative values in microtime

1.24.1 / 2018-03-09

  • Re-align __set_state on DateTime method to ease Laravel compatibility

1.24.0 / 2018-03-09

  • Added createMidnightDate() method
  • Added isLastOfMonth() method
  • Added isDayOfWeek() method
  • Added toRfc7231String() method
  • Added toIso8601ZuluString() method
  • Added hasFormat() method
  • Added toArray() method
  • Added startOfHour() method
  • Added endOfHour() method
  • Added startOfMinute() method
  • Added endOfMinute() method
  • Added midDay() dynamic method, and getMidDayAt, setMidDayAt static methods
  • Added nowWithSameTz() method
  • Added CarbonInterval::compare() method
  • Added year overflow support (addYearsNoOverflow, addYearNoOverflow, addYearsWithOverflow, addYearWithOverflow, subYearNoOverflow, subYearsNoOverflow, subYearWithOverflow, subYearsWithOverflow dynamic methods and useYearsOverflow, resetYearsOverflow, shouldOverflowYears static methods)
  • Added microseconds on calling now with PHP < 7.1 (PHP >= 7.1 still support it natively)
  • Fixed hasRelativeKeywords() that no longer guess if the string is relative but test if it really produces a relative date, making it more accurate
  • Fixed createSafe(), now throws an exception with PHP >= 5.4 if the time is in a hour skipped by daylight saving time
  • Allowed DateTime and DateTimeInterface in diff methods

1.23.0 / 2018-02-28

  • Added ->weekNumberInMonth property
  • Added $parts arguments to diffForHumans() to allow components diff like "1 week 2 days 11 hours"
  • Added createFromTimestampMs method to create from timestamp in milliseconds
  • Fixed/completed translations: ar, az, bg, el, fr, hy (arm), ja, pl, sk, sr, th, uk, uz, zh
  • Added translations: ar_shakl, dv_MV, kk, mn, ps, sr_Cyrl
  • Added Carbon::getDays() returning week days codes
  • getLastErrors() now works also on construct
  • Added workaround for setTimezone bug: https://bugs.php.net/bug.php?id=72338
  • Now Carbon instances can be exported via var_export and recreated with the produced code
  • Compatible with Symfony 4
  • Dates can be mocked now with microseconds
  • Workaround for the coma decimal separator PHP bug https://bugs.php.net/bug.php?id=67127
  • Allow formatLocalized no matter if a custom toStringFormat has been set
  • isSame*() methods now also accept DateTime instances
  • Handle daylight saving time in a better way

1.22.1 / 2017-01-16

  • Fix diffForHumans()
  • Let extended classes access lastErrors

1.22.0 / 2017-01-15

  • Added new langs and fixed up others
  • Various style fixes and small internal code improvements
  • Use atom format for iso8601 as suggested by php docs
  • Added addQuarters/subQuarters
  • Added startOfQuarter/EndOfQuarter
  • Added support for short time units in diffForHumans()
  • Added nextWeek(end)day/previousWeek(end)day
  • Added addCenturies/subCenturies
  • Added support for no overflow when working with months.
  • New is methods for next/last week, month and year
  • Add number of parts in the diffForHumans() interval
  • Added codecov

1.21.0 / 2015-11-04

  • Added new langs and fixed up others
  • Improved race conditions in tests
  • Allow CarbonInterval to hold a 0 interval
  • Added styleci checks and fixes
  • Added closest() and farthest() comparison methods.
  • Made isBirthday() arg optional to allow for easy comparison to today
  • Bumped class loading to psr4

1.20.0 / 2015-06-25

  • Added ms, uz, bn, he, lv langs and fixed up others
  • Added day of week helpers, isSunday(), isMonday() etc.
  • Made first and last day of week dynamic
  • Bumped to symfony/translation ~2.6|~3.0

1.19.0 / 2015-05-08

  • Added fa, az langs and fixed up others
  • Bumped to symfony/translation ~2.6

1.18.0 / 2015-03-25

  • Localization of diffForHumans()
  • Added a CarbonInterval class with localization
  • Added diffInHours() and diffFiltered()
  • Updated addXXXX()/subXXXX() to be an alias for addXXXXs()/subXXXXs() with default params of 1

1.17.0 / 2015-03-08

  • Fixed diff tests that didn't obey TestNow (diffInHours, diffInMinutes, diffInSeconds).
  • Fixed edge case tests

1.16.0 / 2015-03-03

  • Avoid Bug #52063 for PHP <5.3.6
  • Improve diffForHumans()

1.15.0 / 2015-03-02

  • New Site !
  • Let safeCreateDateTimeZone handles null tz
  • Various refactorings
  • Added yearIso getter
  • Improved diffForHumans() to be more accurate (handles daylight savings and Feb)

1.14.0 / 2015-02-06

  • Added isBirthday()
  • Various refactorings
  • Merged MonthsNoOverflow helpers
  • Added 2nd param to diffForHumans() to remove string modifier text
  • Improved readme for installation
  • Simplified __get method
  • timezone support for method formatLocalized
  • Added helpers secondsSinceMidnight() / secondsUntilEndOfDay()

1.13.0 / 2014-09-25

  • Fixed diffInDaysFiltered() bug.
  • Removed default param from formatLocalized() (thanks @vlakoff)
  • Various refactorings (thanks @lucasmichot @euromark)
  • Updated toXXXString() methods to be camel cased (thanks @euromark)
  • Now using 4 spaces for indent. (thanks @lucasmichot @euromark)

1.12.0 / 2014-09-09

  • Add new functions diffInDaysFiltered(), diffInWeekdays() and diffInWeekendDays() (thanks @m4tthumphrey)
  • Fixed XofQuarter methods when moving to a month that doesn't have that day it jumps forward #168
  • Support for microseconds during instantiation and copy. Be aware that microseconds are ignored for doing any of the math.
  • Microsecond getter.
  • Various refactorings (thanks @lucasmichot @lorenzo)

1.11.0 / 2014-08-25

  • Added isSameDay() (thanks @enkelmedia)
  • Added diffInWeeks(), maxValue() and minValue() (thanks @lucasmichot)
  • Improved accuracy of diffForHumans() by using 30/7 for weeks and moving the floor() call to outside the loop. Fixed tests that just look better now as a result.
  • Improved readme with common formats example output (thanks @troyharvey)
  • Various internal refactors (thanks @lucasmichot)

1.10.0 / 2014-07-17

  • Changed @return Carbon phpdocs to static for better IDE typehint when extending Carbon
  • Fixed Carbon.php download link
  • Added 5.6 and HHVM to test coverage
  • Fixed issue with isPast() returning true for now()
  • Added getter for weekOfMonth

1.9.0 / 2014-05-12

  • Changed self references to static to allow for easier child classes
  • Fixed a couple of tests to account for London DST
  • Fixed a test that failed due to inconsistent DateTime COOKIE strings

1.8.0 / 2014-01-06

  • Added .gitattributes file to to ignore some files on export (thanks @lucasmichot)
  • Removed unnecessary __set tz/timezone switch
  • Added min() / max() (thanks @lucasmichot)
  • Fixed startOfWeek() / endOfWeek() when crossing year boundary.
  • Fixed bug in detecting relative keywords in ctor parameter when using a test now

1.7.0 / 2013-12-04

  • Added startOfYear() / endOfYear() (thanks @semalead)
  • Added average() (thanks @semalead)

1.6.0 / 2013-11-23

  • Fixed "Cannot access property ::$toStringFormat" when extending Carbon and type juggling to a string occurs

1.5.0 / 2013-11-21

  • Diff for humans now shows 2 weeks ago instead of 14 days ago
  • Added a local getter to test if the instance is in the local timezone
  • Added a utc getter to check if the instance is in UTC timezone
  • Fixed dst comment / phpdoc and psr issues
  • Optimize timezone getters (thanks @semalead)
  • Added static __toString formatting (thanks @cviebrock and @anlutro)

1.4.0 / 2013-09-08

  • Corrected various PHPdocs
  • formatLocalized() is now more OS independent
  • Improved diff methods
  • Test now can be mocked using a relative term

1.3.0 / 2013-08-21

  • Added modifier methods firstOfMonth(), lastOfMonth(), nthOfMonth(), next(), previous(), and so on
  • Added modifiers startOfWeek() and endOfWeek()
  • Added testing helpers to allow mocking of new Carbon(), new Carbon('now') and Carbon::now()
  • Added formatLocalized() to format a string using strftime() with the current locale
  • Improved diffInSeconds()
  • Improved [add|sub][Years|Months|Days|Hours|Minutes|Seconds|Weeks]
  • Docblocks everywhere ;(
  • Magic class properties
  • Added PHP 5.5 to travis test coverage
  • General Code cleanup

1.2.0 / 2012-10-14

  • Added history.md
  • Implemented __isset() (thanks @flevour)
  • Simplified tomorrow()/yesterday() to rely on today()... more DRY
  • Simplified __set() and fixed exception text
  • Updated readme

1.1.0 / 2012-09-16

  • Updated composer.json
  • Added better error messaging for failed readme generation
  • Fixed readme typos
  • Added static helpers today(), tomorrow(), yesterday()
  • Simplified now() code

1.0.1 / 2012-09-10

  • Added travis-ci.org

1.0.0 / 2012-09-10

  • Initial release