Repository navigation
Releases: brick/date-time
Releases Β· brick/date-time
Release list
0.10.4
0.10.3
π Bug fixes
ZonedDateTime::of()andLocalDateTime::atTimeZone()failed for years beyond9999(#135 by @gnutix)toNativeDateTime()andtoNativeDateTimeImmutable()onLocalDateTimeandZonedDateTimefailed for years beyond9999and negative years (#135 by @gnutix)ZonedDateTime::toNativeDateTime()andtoNativeDateTimeImmutable()returned the wrong offset during a DST overlap (#135 by @gnutix)
β‘οΈ Performance optimizations
0.10.2
0.10.1
0.10.0
0.9.0
0.8.1
β¨ Compatibility improvements
- The following parser and parse methods now accept hours only in timezone offsets, such as
+01equivalent to+01:00(#123 by @antonkomarev):IsoParsers:timeZoneOffset()TimeZoneOffset::parse()ZonedDateTime::parse()
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