Repository navigation
Releases
Releases · CarbonPHP/carbon
3.15.1
What's Changed
- Fix Russian millisecond and microsecond plural forms by @smotim in #158
- Fix Arabic plural forms for counts above 100 by @123mousab in briannesbitt/Carbon#3397
- Only match ASCII digits when locating era tokens by @kamthorn in briannesbitt/Carbon#3399
- Keep the time in
weekYear()andisoWeekYear()setters by @mkantautas in briannesbitt/Carbon#3398
New Contributors
- @smotim made their first contribution in #158
- @mkantautas made their first contribution in briannesbitt/Carbon#3398
Full Changelog: 3.15.0...3.15.1
3.15.0
What's Changed
- Interoperation with PHP
\Time\Durationclass (briannesbitt/Carbon#3383)- Add CarbonInterval
toDuration/fromDurationforTime\Duration(PHP 8.6) by @sergioperezcheco
and @kylekatarnls in #155 - Add diffAsDuration() method to CarbonImmutable and Carbon classes and support for Duration parameter in multiple methods by @kylekatarnls in #156
new CarbonInterval()/CarbonInterval::make()/new CarbonPeriod()- CarbonInterval
equalTo()/greaterThan()/lessThan()/isBetween()/ etc. - Carbon/CarbonImmutable
add()/sub()/round()/floor()/ceil() - Carbon/CarbonImmutable
carbonize()/roundUnit()/floorUnit()/ceilUnit() - Carbon/CarbonImmutable
isStartOf*()/isEndOfUnit*() - Carbon/CarbonImmutable
stepBy()/toPeriod()/range()
- Add CarbonInterval
- Fix millisecond timestamps before 1970 by @SulimanAbdulrazzaq in briannesbitt/Carbon#3381
- Fix day of year parsing in createFromIsoFormat by @kevin9327 in briannesbitt/Carbon#3382
- Add #[NoDiscard] on CarbonImmutable modifiers by @orcnd in briannesbitt/Carbon#3380
- Add moment.js era tokens to isoFormat() by @kamthorn in briannesbitt/Carbon#3378
- Fix Arabic locale data by @123mousab in briannesbitt/Carbon#3386
- Fix callable meridiem masked by fallback locale by @chengkangzai in briannesbitt/Carbon#3387
- Fix parsing tomorrow in Arabic locales by @123mousab in briannesbitt/Carbon#3388
- Parse moment.js era tokens in createFromIsoFormat() by @kamthorn in briannesbitt/Carbon#3384
- Fix memory leak in CarbonPeriod by @alex-laty in briannesbitt/Carbon#3389
- Update sponsors by @github-actions[bot] in briannesbitt/Carbon#3391
New Contributors
- @SulimanAbdulrazzaq made their first contribution in briannesbitt/Carbon#3381
- @kevin9327 made their first contribution in briannesbitt/Carbon#3382
- @orcnd made their first contribution in briannesbitt/Carbon#3380
- @123mousab made their first contribution in briannesbitt/Carbon#3386
- @chengkangzai made their first contribution in briannesbitt/Carbon#3387
- @alex-laty made their first contribution in briannesbitt/Carbon#3389
- @sergioperezcheco made their first contribution in briannesbitt/Carbon#3392
Full Changelog: 3.14.2...3.15.0
3.14.2
What's Changed
- Fix first character after macro expansion in isoFormat() by @kamthorn in briannesbitt/Carbon#3369
- Fix CLDR pattern letters left in locale formats by @kamthorn in briannesbitt/Carbon#3370
- Add Thai digits (alt_numbers) to th locale by @kamthorn in briannesbitt/Carbon#3375
- Upgrade PHPMD to v3 by @kylekatarnls in #152
New Contributors
- @kamthorn made their first contribution in briannesbitt/Carbon#3369
Full Changelog: 3.14.1...3.14.2
3.14.1
What's Changed
- Fix #146 yearly overflow by @kylekatarnls in #149
- Allow to use
floattimestamps andDateTimeInterfaceinmonthly(),quarterly()andyearly()by @kylekatarnls in #150 - Fix support for decimal number in
addWeekdays()andsubWeekdays()by @kylekatarnls in #151 - Fix
CarbonInterval::spec()when the fraction holds a second or more by @t1gor in briannesbitt/Carbon#3366 - Fix numeric
round()/floor()/ceil()precision >= 60 seconds does not carry into minute/hour/day by @dualfroz in briannesbitt/Carbon#3359
New Contributors
- @t1gor made their first contribution in briannesbitt/Carbon#3366
- @dualfroz made their first contribution in briannesbitt/Carbon#3359
Full Changelog: 3.14.0...3.14.1
3.14.0
What's Changed
- Prevent unintended injection of unsafe filters or non-date classes during period unserialization by @kylekatarnls and @iliaal in #145
Full Changelog: 3.13.3...3.14.0
CarbonPeriod objects that may have custom filters or custom dateClass, you might experience breaking change in some specific edge cases starting with this version
3.13.3
What's Changed
- Fix: abs(): Argument #1 ($num) must be of type int|float, string given by @hbh112233abc in #136
- Fix Yoruba (yo) locale: correct "second" unit spelling to "aayá" by @oluwatosinolamilekan in #140
- Add
e,p,Xand x to thetranslatedFormat()replacement map - #3357 by @dylanpulver in briannesbitt/Carbon#3357 - Replace
spl_object_hashwithspl_object_idby @kylekatarnls in #142 - Quote non-token characters in
matchFormatPatternby @iliaal in #141
New Contributors
- @dylanpulver made their first contribution in briannesbitt/Carbon#3357
- @hbh112233abc made their first contribution in #136
- @oluwatosinolamilekan made their first contribution in #140
- @iliaal made their first contribution in #141
Full Changelog: 3.13.2...3.13.3
3.13.2
What's Changed
- Prioritize day names over month names when translating string before the first number occurs in the string by @kylekatarnls in #139
Full Changelog: 3.13.1...3.13.2
3.13.1
What's Changed
- Implement
CarbonPeriod::quarterly()by @kylekatarnls in #130 - Fix translation spacing by @kylekatarnls in #135
Full Changelog: 3.13.0...3.13.1
3.13.0
What's Changed
- Add year interval/period with overflow modes by @kylekatarnls in #127
- Allow to load custom locales even when mute-operator is bypassed by @kylekatarnls in #128
- Implement
overflowandanchorDayparameters formonth(),setMonth(),year()andsetYear()by @kylekatarnls in #129
Full Changelog: 3.12.3...3.13.0
3.12.3
What's Changed
- Improve
plus()andminus()method by @kylekatarnls in #126- Add
$anchorDayparameter andOverflowModefor$overflowparameter - Add float support for
$weeks,$days,$hours,$minutes,$secondsand$microseconds - Use
__callso sub-classes are allowed to override those methods with divergent signatures
- Add
Full Changelog: 3.12.2...3.12.3