github briannesbitt/Carbon 1.23.0

latest releases: 3.3.1, 3.3.0, 3.2.4...
6 years ago

Complete commits list: 1.22.1...1.23.0

Summary:

  • Add ->weekNumberInMonth property
  • Add $parts arguments to diffForHumans() to allow components diff like "1 week 2 days 11 hours"
  • Add createFromTimestampMs method to create from timestamp in milliseconds
  • Fix/complete translations: ar, az, bg, el, fr, hy (arm), ja, pl, sk, sr, th, uk, uz, zh
  • Add translations: ar_shakl, dv_MV, kk, mn, ps, sr_Cyrl
  • Add Carbon::getDays() returning week days codes
  • getLastErrors() now works also on construct
  • Add 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

Don't miss a new Carbon release

NewReleases is sending notifications on new releases.