Releases: brick/date-time
Releases · brick/date-time
0.9.0
0.8.1
0.8.0
💥 Breaking changes
Duration::toISOString()and__toString()now output negative durations as-P...(#122 by @BastienClement)
Example:-PT2H21Minstead ofPT-2H-21M.
This aligns with ISO 8601-2:2019 and improves compatibility with the JavaScript Temporal API.
0.7.1
0.7.0
💥 Breaking changes
DayOfWeek:- deprecated method
of()has been removed, useDayOfWeek::from()instead - the following deprecated methods have been removed, use enum values instead:
DayOfWeek::monday()→DayOfWeek::MONDAYDayOfWeek::tuesday()→DayOfWeek::TUESDAYDayOfWeek::wednesday()→DayOfWeek::WEDNESDAYDayOfWeek::thursday()→DayOfWeek::THURSDAYDayOfWeek::friday()→DayOfWeek::FRIDAYDayOfWeek::saturday()→DayOfWeek::SATURDAYDayOfWeek::sunday()→DayOfWeek::SUNDAY
- deprecated method
getValue()has been removed, use$dayOfWeek->valueinstead - deprecated method
is()has been removed, compare values with$dayOfWeekor$dayOfWeek->valueinstead - deprecated method
isEqualTo()has been removed, use strict equality===betweenDayOfWeekinstances instead.
- deprecated method
DefaultClock:- deprecated method
travel()has been removed, usetravelTo()instead
- deprecated method
LocalDate:- deprecated method
getDay()has been removed, usegetDayOfMonth()instead getMonth()now returns aMonthenum; usegetMonthValue()if you want the month number
- deprecated method
LocalDateTime:- deprecated method
getDay()has been removed, usegetDayOfMonth()instead getMonth()now returns aMonthenum; usegetMonthValue()if you want the month number
- deprecated method
Month:- deprecated method
of()has been removed, useMonth::from()instead - deprecated method
getAll()has been removed, useMonth::cases()instead - deprecated method
getValue()has been removed, use$month->valueinstead - deprecated method
is()has been removed, compare values with$monthor$month->valueinstead - deprecated method
isEqualTo()has been removed, use strict equality===betweenMonthinstances instead
- deprecated method
MonthDay:- deprecated method
getDay()has been removed, usegetDayOfMonth()instead getMonth()now returns aMonthenum; usegetMonthValue()if you want the month number
- deprecated method
YearMonth:getMonth()now returns aMonthenum; usegetMonthValue()if you want the month number
ZonedDateTime:- deprecated method
getDay()has been removed, usegetDayOfMonth()instead getMonth()now returns aMonthenum; usegetMonthValue()if you want the month number
- deprecated method
🔧 Improvements
- Methods returning
intare now type-annotated with int ranges
0.6.5
0.6.4
0.6.3
0.6.2
✨ New features
MonthDay::of()andMonthDay::withMonth()now accept aMonthenum as parameter (#106)LocalDate::of()andLocalDate::withMonth()now accept aMonthenum as parameter (#106)LocalDateTime::of()andLocalDateTime::withMonth()now accept aMonthenum as parameter (#106)ZonedDateTime::withMonth()now accepts aMonthenum as parameter (#106)
✨ Undeprecations
- Passing an
inttoYear::atMonth()is un-deprecated, and now valid again (#103) - Passing an
inttoYearMonth::of()andYearMonth::withMonth()is un-deprecated, and now valid again (#103) - Passing an
inttoYearWeek::atDay()is un-deprecated, and now valid again (#103)
Thanks to @gnutix!
0.6.1
✨ New features
Year::atMonth()now accepts aMonthenum as parameter (#95)YearMonth::of()andYearMonth::withMonth()now accept aMonthenum as parameter (#96)
🔧 Improvements
- Narrower Psalm types for
compareTo(),__toString(),toISOString(),jsonSerialize()methods (#97)
💩 Deprecations
- Passing an
inttoYear::atMonth()is now deprecated, pass aMonthenum instead (#95) - Passing an
inttoYearMonth::of()andYearMonth::withMonth()is now deprecated, pass aMonthenum instead (#96)
Thanks to @gnutix!