Releases: Kotlin/kotlinx-datetime
Releases Β· Kotlin/kotlinx-datetime
v0.7.1
- Add
kotlinx.datetime.Instantandkotlinx.datetime.Clocktype aliases to, respectively,kotlin.time.Instantandkotlin.time.Clockto make migration more convenient. - Add a fallback timezone database implementation for Darwin that uses the Foundation framework if the timezone database is unavailable on the filesystem (#485).
- Restore binary compatibility in string format definitions utilizing dates on the JVM (#545).
v0.7.0
Breaking changes:
- Remove
kotlinx.datetime.Instantandkotlinx.datetime.Clockin favor ofkotlin.time.Instant(#506). See https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant for a description of what to do if this causes problems. - Unify the range of admissible
LocalDateandLocalDateTimevalues on all platforms (#432). - Rename
dayOfMonthtoday,monthNumbertomonth(#84). - Make
DayOfWeekandMonthno longer type aliases tojava.time.DayOfWeekandjava.time.Month(#96). - Make
"UTC"and not"Z"be the timezone identifier forTimeZone.UTC(#474). - Accept
"z"inTimeZone.of, with the same meaning as"Z"(#529). - Add
DateTimeFormat-basedKSerializerimplementations for datetime entities, and change the default serializers to be based ontoString/parsepairs (#415).
Additions:
- Add
java.io.Serializableimplementations for most of the entities in the library (#143). Thanks for spotting and fixing a potential vulnerability, @lukellmann! - Add
LocalDateRange, a range ofLocalDatevalues (#190). Thanks, @PeterAttardo! - Add
YearMonthandYearMonthRange(#457).
Tweaks and fixes:
- Support obtaining the system timezone on old Debian-based distributions (#430).
- Fix not being able to parse some valid timezone identifiers using the
timeZoneId()directive (#444). - Use the grammar defined in RFC 9557 for parsing timezone identifiers in the
timeZoneId()directive, allowing parsing values not present in the timezone database (#531). - Improved error messages when formatting an invalid
DateTimeComponentsvalue (#471). - Set the JPMS dependency on
kotlinx.serialization.coreto be optional (#496).
v0.6.2
- Add the Wasm/WASI target support (#366). Thanks, @igoriakovlev!
- Add
TimeSource.asClock(#164). Thanks, @hfhbd! - Implement parsing and formatting day-of-year (#414)
- Improve the precision of
NSDatetoInstantconversions (#427) - Deprecate
DatePeriod.plusandDateTimePeriod.pluswith a warning (#381) - Deprecate
Clock.asTimeSourcewith a warning (#372) - Fix a bug in
module-infopreventing usingkotlinx.datetime.formattogether with JPMS (#438). Thanks, @cdelabou! - Small tweaks and fixes.
v0.6.1
- Prohibit parsing non-ASCII digits as numbers in
DateTimeFormat(#405) - More accurately determine which files represent time zones and which don't on Linux and Darwin (#395)
- Fix a regression that occasionally considered the right boundary of a time overlap to be a part of it on Native (#399)
- Introduce various small improvements to the timezone handling on Windows (#390)
- On Linux, allow not having any
/etc/localtimeset, defaulting toTimeZone.UTCas the system time zone (#426)
v0.6.0
- Introduce the widely requested API for locale-invariant parsing and formatting (#343)
- Completely overhaul the KDoc-based documentation (#347)
- Breaking change: forbid parsing
Instantvalues without the second-of-minute component on the JVM and JS, fixing inconsistency with Native (#369) - Breaking change: use the fully qualified name of classes in the JSON serializers (#308)
- Fix Proguard emitting warning about missing
kotlinx-serializationclasses when serialization is not used (#336) - Reimplement the timezone database handling for Native targets from scratch (#286, #327)
- Support Android NDK targets (#344)
- Small tweaks and fixes.
Changelog relative to version 0.6.0-RC.2
- Completely overhaul the KDoc-based documentation (#347)
- Breaking change: forbid parsing
Instantvalues without the second-of-minute component on the JVM and JS, fixing inconsistency with Native (#369) - Improve error descriptiveness in some cases (#360, #371)
- Remove
statusages to comply with Apple's new publishing requirements (#385) - Fix parsing of formats where
optionalis directly between numbers (#362) - Forbid empty and duplicate month, day-of-week, and AM/PM marker names in datetime formats (#362)
New Contributors
- @whyoleg made their first contribution in #323
- @qwwdfsad made their first contribution in #308
- @shanshin made their first contribution in #380
Full Changelog: v0.5.0...v0.6.0
v0.6.0-RC.2
v0.6.0-RC
- Introduce the widely requested API for locale-invariant parsing and formatting (#343)
- Breaking change: use the fully qualified name of classes in the JSON serializers (#308)
- Fix Proguard emitting warning about missing
kotlinx-serializationclasses when serialization is not used (#336) - Reimplement the timezone database handling for Native targets from scratch (#286, #327)
v0.5.0
- Update Kotlin dependency to 1.9.21, kotlinx.serialization to 1.6.2
- Add support of Wasm-Js target through Js interop with the same js-joda library as in Js (#315)
- Prevent secondary outputs of Java 9 compilation getting packed into jar (#305)
New Contributors
- @FenstonSingel made their first contribution in #318
- @igoriakovlev made their first contribution in #315
Full Changelog: v0.4.1...v0.5.0
v0.4.1
- Update Kotlin dependency to 1.8.21, kotlinx.serialization to 1.5.1
- Support more Kotlin/Native targets:
linuxArm64,linuxArm32Hfp,watchosDeviceArm64 - Implement comparable time marks in a time source returned by
Clock.asTimeSource()(#271) - Deprecate
InstantandLocalDatearithmetic operations (plusandminus) takingDateTimeUnitwithout a number of units (#247) - Fix adding small
Durationto largeInstanton JS and Native (#264)
New Contributors
- @lukellmann made their first contribution in #264
- @NinoDLC made their first contribution in #252
- @MarkCMann made their first contribution in #288
- @joffrey-bion made their first contribution in #292
- @cmota made their first contribution in #278
Full Changelog: v0.4.0...v0.4.1
v0.4.0
- Add the
LocalTimeclass for representing time-of-day (#57). Thank you, @bishiboosh! - Provide
LocalTime#toSecondOfDay,LocalTime.fromSecondOfDay, and various other functions for compact representation ofLocalTime(#204). Thank you, @vanniktech! - Provide
LocalDate#toEpochDays,LocalDate.fromEpochDaysfor representing aLocalDateas a single number (#214). - Rename
Clock.todayAttoClock.todayInfor naming consistency (#206). - Update the Kotlin dependency to 1.7.0.