Skip to content

0.5.4

Compare
Choose a tag to compare
@BenMorel BenMorel released this 16 Oct 21:17
· 98 commits to master since this release
f4d8dfd

🐛 Bug fixes

  • YearMonth::__toString() would return an invalid string for years < 1000 (#87)

New methods

  • Year::parse() and Year::from() (#86)
  • YearWeek::parse() and YearWeek::from() (#86)
  • the following classes now have a toISOString() method: (#87)
    • Duration
    • Instant
    • Interval
    • LocalDate
    • LocalDateRange
    • LocalDateTime
    • LocalTime
    • MonthDay
    • Period
    • Year
    • YearMonth
    • YearMonthRange
    • YearWeek
    • ZonedDateTime

The toISOString() methods return the same result as __toString(), but are better suited for the nullsafe operator:

$date?->toISOString();

⚡️ Performance optimizations

  • Most __toString() methods got a small performance boost (#85)

Thanks to @gnutix!