Releases: brick/date-time
Releases · brick/date-time
0.5.2
0.5.1
0.5.0
💥 Breaking changes
-
Deprecated
Interval
constructor is nowprivate
; please useInterval::of()
instead -
The following deprecated methods have been removed, please use the new names:
Class Name Old Method Name New Method Name LocalDate
fromDateTime()
fromNativeDateTime()
LocalDate
toDateTime()
toNativeDateTime()
LocalDate
toDateTimeImmutable()
toNativeDateTimeImmutable()
LocalDateRange
toDatePeriod()
toNativeDatePeriod()
LocalDateTime
fromDateTime()
fromNativeDateTime()
LocalDateTime
toDateTime()
toNativeDateTime()
LocalDateTime
toDateTimeImmutable()
toNativeDateTimeImmutable()
LocalTime
fromDateTime()
fromNativeDateTime()
LocalTime
toDateTime()
toNativeDateTime()
LocalTime
toDateTimeImmutable()
toNativeDateTimeImmutable()
Period
fromDateInterval()
fromNativeDateInterval()
Period
toDateInterval()
toNativeDateInterval()
TimeZone
fromDateTimeZone()
fromNativeDateTimeZone()
TimeZone
toDateTimeZone()
toNativeDateTimeZone()
ZonedDateTime
fromDateTime()
fromNativeDateTime()
ZonedDateTime
toDateTime()
toNativeDateTime()
ZonedDateTime
toDateTimeImmutable()
toNativeDateTimeImmutable()
0.4.3
🔧 Improvements
TimeZoneOffset::parse()
return type has been narrowed toTimeZoneOffset
- Support for seconds in
TimeZoneOffset
has been added back (#60) (@jiripudil)
🐛 Bug fixes
- Old date/times could fail to be parsed by
ZonedDateTime
due to sub-minute timezone offsets (#44)
0.4.2
✨ New methods
Duration::isGreaterThanOrEqualTo()
(#50)Duration::isLessThanOrEqualTo()
(#50)Interval::of()
(#64)Interval::contains()
(#64)Interval::intersectsWith()
(#64)Interval::getIntersectionWith()
(#64)Interval::isEqualTo()
(#64)
💩 Deprecations
Interval
constructor is deprecated in favour ofInterval::of()
(#64)
Thanks to @ihmels and @someniatko!
0.4.1
✨ New methods
LocalDateRange::toPeriod()
(#51)Year::toLocalDateRange()
(#46)YearMonth::toLocalDateRange()
(#46)YearMonthRange::toLocalDateRange()
(#46)YearWeek::toLocalDateRange()
(#46)
💩 Deprecations
The following methods have been deprecated in favour of new names (#47):
Period::fromDateInterval()
→fromNativeDateInterval()
Period::toDateInterval()
→toNativeDateInterval()
TimeZone::fromDateTimeZone()
→fromNativeDateTimeZone()
TimeZone::toDateTimeZone()
→toNativeDateTimeZone()
LocalTime::fromDateTime()
→fromNativeDateTime()
LocalTime::toDateTime()
→toNativeDateTime()
LocalTime::toDateTimeImmutable()
→toNativeDateTimeImmutable()
LocalDateRange::toDatePeriod()
→toNativeDatePeriod()
LocalDate::fromDateTime()
→fromNativeDateTime()
LocalDate::toDateTime()
→toNativeDateTime()
LocalDate::toDateTimeImmutable()
→toNativeDateTimeImmutable()
ZonedDateTime::fromDateTime()
→fromNativeDateTime()
ZonedDateTime::toDateTime()
→toNativeDateTime()
ZonedDateTime::toDateTimeImmutable()
→toNativeDateTimeImmutable()
LocalDateTime::fromDateTime()
→fromNativeDateTime()
LocalDateTime::toDateTime()
→toNativeDateTime()
LocalDateTime::toDateTimeImmutable()
→toNativeDateTimeImmutable()
Thanks to @solodkiy, and to @tigitz for introducing long overdue coding standards!
0.4.0
💥 Breaking changes
- Minimum PHP version is now 7.4
TimeZoneOffset
does not allow seconds anymore (#35):TimeZoneOffset::of()
's$seconds
parameter is removedTimeZoneOffset::ofTotalSeconds()
now throws if the number of seconds is not a multiple of60
IsoParsers::timeZoneOffset()
does not allow seconds in timezone offset anymore; this affects not onlyTimeZoneOffset:parse()
but alsoZonedDateTime::parse()
🔧 Fix
- Fixed return type of
TimeZoneRegion::parse()
(#38) Thanks to @adrianguenter
✨ New methods
Period::fromDateInterval()
converts a nativeDateInterval
object toPeriod