KotlinX multiplatform date/time library
kotlinx-serialization
classes when serialization is not used (#336)Full Changelog: https://github.com/Kotlin/kotlinx-datetime/compare/v0.4.1...v0.5.0
linuxArm64
, linuxArm32Hfp
, watchosDeviceArm64
Clock.asTimeSource()
(#271)Instant
and LocalDate
arithmetic operations (plus
and minus
) taking DateTimeUnit
without a number of units (#247)Duration
to large Instant
on JS and Native (#264)Full Changelog: https://github.com/Kotlin/kotlinx-datetime/compare/v0.4.0...v0.4.1
LocalTime
class for representing time-of-day (#57). Thank you, @bishiboosh!LocalTime#toSecondOfDay
, LocalTime.fromSecondOfDay
, and various other functions for compact representation of LocalTime
(#204). Thank you, @vanniktech!LocalDate#toEpochDays
, LocalDate.fromEpochDays
for representing a LocalDate
as a single number (#214).Clock.todayAt
to Clock.todayIn
for naming consistency (#206).iosSimulatorArm64
, watchosSimulatorArm64
, tvosSimulatorArm64
, macosArm64
target support (141, 144).ZoneOffset
was replaced by two other classes: FixedOffsetTimeZone
, which represents a time zone with a fixed offset, and UtcOffset
, which represents just the UTC offset (PR#125).DayBased
and MonthBased
subclasses of DateTimeUnit.DateBased
are now accessed as DateTimeUnit.DayBased
and DateTimeUnit.MonthBased
as opposed to DateTimeUnit.DateBased.DayBased
and DateTimeUnit.DateBased.MonthBased
respectively (PR#131).watchosX64
target support. In practice, this means the ability to run projects that depend on this library in the iOS Simulator for Apple Watch.