Skip to content

Commit

Permalink
Deprecate Instant while ensuring binary compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed Dec 13, 2024
1 parent 9e2d69e commit 114661d
Show file tree
Hide file tree
Showing 58 changed files with 2,357 additions and 1,719 deletions.
50 changes: 50 additions & 0 deletions core/api/kotlinx-datetime.api
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ public final class kotlinx/datetime/Clock$System : kotlinx/datetime/Clock {

public final class kotlinx/datetime/ClockKt {
public static final fun asTimeSource (Lkotlinx/datetime/Clock;)Lkotlin/time/TimeSource$WithComparableMarks;
public static final fun asTimeSource (Lkotlinx/time/Clock;)Lkotlin/time/TimeSource$WithComparableMarks;
public static final fun todayAt (Lkotlinx/datetime/Clock;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/LocalDate;
public static final fun todayAt (Lkotlinx/time/Clock;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/LocalDate;
public static final fun todayIn (Lkotlinx/datetime/Clock;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/LocalDate;
public static final fun todayIn (Lkotlinx/time/Clock;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/LocalDate;
}

public final class kotlinx/datetime/ConvertersKt {
Expand Down Expand Up @@ -171,6 +174,9 @@ public final class kotlinx/datetime/DayOfWeekKt {
public static final fun getIsoDayNumber (Ljava/time/DayOfWeek;)I
}

public final class kotlinx/datetime/DeprecationMarker {
}

public final class kotlinx/datetime/FixedOffsetTimeZone : kotlinx/datetime/TimeZone {
public static final field Companion Lkotlinx/datetime/FixedOffsetTimeZone$Companion;
public fun <init> (Lkotlinx/datetime/UtcOffset;)V
Expand Down Expand Up @@ -220,19 +226,30 @@ public final class kotlinx/datetime/Instant$Companion {

public final class kotlinx/datetime/InstantJvmKt {
public static final fun minus (Lkotlinx/datetime/Instant;ILkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/Instant;
public static final fun minus (Lkotlinx/time/Instant;ILkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun periodUntil (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/DateTimePeriod;
public static final fun periodUntil (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/DateTimePeriod;
public static final fun plus (Lkotlinx/datetime/Instant;ILkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/Instant;
public static final fun plus (Lkotlinx/datetime/Instant;JLkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/datetime/Instant;
public static final fun plus (Lkotlinx/datetime/Instant;JLkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/Instant;
public static final fun plus (Lkotlinx/datetime/Instant;Lkotlinx/datetime/DateTimePeriod;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/Instant;
public static final fun plus (Lkotlinx/datetime/Instant;Lkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/Instant;
public static final fun plus (Lkotlinx/time/Instant;ILkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun plus (Lkotlinx/time/Instant;JLkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/time/Instant;
public static final fun plus (Lkotlinx/time/Instant;JLkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun plus (Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimePeriod;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun plus (Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun until (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)J
public static final fun until (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)J
}

public final class kotlinx/datetime/InstantKt {
public static final fun daysUntil (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/TimeZone;)I
public static final fun daysUntil (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/TimeZone;)I
public static final fun format (Lkotlinx/datetime/Instant;Lkotlinx/datetime/format/DateTimeFormat;Lkotlinx/datetime/UtcOffset;)Ljava/lang/String;
public static final fun format (Lkotlinx/time/Instant;Lkotlinx/datetime/format/DateTimeFormat;Lkotlinx/datetime/UtcOffset;)Ljava/lang/String;
public static synthetic fun format$default (Lkotlinx/datetime/Instant;Lkotlinx/datetime/format/DateTimeFormat;Lkotlinx/datetime/UtcOffset;ILjava/lang/Object;)Ljava/lang/String;
public static synthetic fun format$default (Lkotlinx/time/Instant;Lkotlinx/datetime/format/DateTimeFormat;Lkotlinx/datetime/UtcOffset;ILjava/lang/Object;)Ljava/lang/String;
public static final fun isDistantFuture (Lkotlinx/datetime/Instant;)Z
public static final fun isDistantPast (Lkotlinx/datetime/Instant;)Z
public static final fun minus (Lkotlinx/datetime/Instant;ILkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/datetime/Instant;
Expand All @@ -244,12 +261,29 @@ public final class kotlinx/datetime/InstantKt {
public static final fun minus (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/DateTimeUnit$TimeBased;)J
public static final fun minus (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)J
public static final fun minus (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/DateTimePeriod;
public static final fun minus (Lkotlinx/time/Instant;ILkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/time/Instant;
public static final fun minus (Lkotlinx/time/Instant;JLkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/time/Instant;
public static final fun minus (Lkotlinx/time/Instant;JLkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun minus (Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimePeriod;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun minus (Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/time/Instant;
public static final fun minus (Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)Lkotlinx/time/Instant;
public static final fun minus (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit$TimeBased;)J
public static final fun minus (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit;Lkotlinx/datetime/TimeZone;)J
public static final fun minus (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/DateTimePeriod;
public static final fun monthsUntil (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/TimeZone;)I
public static final fun monthsUntil (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/TimeZone;)I
public static final fun parse (Lkotlinx/time/Instant$Companion;Ljava/lang/CharSequence;Lkotlinx/datetime/format/DateTimeFormat;)Lkotlinx/time/Instant;
public static final fun plus (Lkotlinx/datetime/Instant;ILkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/datetime/Instant;
public static final fun plus (Lkotlinx/datetime/Instant;Lkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/datetime/Instant;
public static final fun plus (Lkotlinx/time/Instant;ILkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/time/Instant;
public static final fun plus (Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit$TimeBased;)Lkotlinx/time/Instant;
public static final fun toDeprecatedInstant (Lkotlinx/time/Instant;)Lkotlinx/datetime/Instant;
public static final fun toInstant (Ljava/lang/String;)Lkotlinx/datetime/Instant;
public static final fun toNewInstant (Lkotlinx/datetime/Instant;)Lkotlinx/time/Instant;
public static final fun until (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/DateTimeUnit$TimeBased;)J
public static final fun until (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/DateTimeUnit$TimeBased;)J
public static final fun yearsUntil (Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;Lkotlinx/datetime/TimeZone;)I
public static final fun yearsUntil (Lkotlinx/time/Instant;Lkotlinx/time/Instant;Lkotlinx/datetime/TimeZone;)I
}

public final class kotlinx/datetime/LocalDate : java/lang/Comparable {
Expand Down Expand Up @@ -414,7 +448,10 @@ public class kotlinx/datetime/TimeZone {
public final fun getId ()Ljava/lang/String;
public fun hashCode ()I
public final fun toInstant (Lkotlinx/datetime/LocalDateTime;)Lkotlinx/datetime/Instant;
public final fun toInstant (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/DeprecationMarker;)Lkotlinx/time/Instant;
public static synthetic fun toInstant$default (Lkotlinx/datetime/TimeZone;Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/DeprecationMarker;ILjava/lang/Object;)Lkotlinx/time/Instant;
public final fun toLocalDateTime (Lkotlinx/datetime/Instant;)Lkotlinx/datetime/LocalDateTime;
public final fun toLocalDateTime (Lkotlinx/time/Instant;)Lkotlinx/datetime/LocalDateTime;
public fun toString ()Ljava/lang/String;
}

Expand All @@ -428,11 +465,21 @@ public final class kotlinx/datetime/TimeZone$Companion {

public final class kotlinx/datetime/TimeZoneKt {
public static final fun atStartOfDayIn (Lkotlinx/datetime/LocalDate;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/Instant;
public static final fun atStartOfDayIn (Lkotlinx/datetime/LocalDate;Lkotlinx/datetime/TimeZone;Lkotlinx/datetime/DeprecationMarker;)Lkotlinx/time/Instant;
public static synthetic fun atStartOfDayIn$default (Lkotlinx/datetime/LocalDate;Lkotlinx/datetime/TimeZone;Lkotlinx/datetime/DeprecationMarker;ILjava/lang/Object;)Lkotlinx/time/Instant;
public static final fun offsetAt (Lkotlinx/datetime/TimeZone;Lkotlinx/datetime/Instant;)Lkotlinx/datetime/UtcOffset;
public static final fun offsetAt (Lkotlinx/datetime/TimeZone;Lkotlinx/time/Instant;)Lkotlinx/datetime/UtcOffset;
public static final fun offsetIn (Lkotlinx/datetime/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/UtcOffset;
public static final fun offsetIn (Lkotlinx/time/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/UtcOffset;
public static final fun toInstant (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/Instant;
public static final fun toInstant (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/TimeZone;Lkotlinx/datetime/DeprecationMarker;)Lkotlinx/time/Instant;
public static final fun toInstant (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/UtcOffset;)Lkotlinx/datetime/Instant;
public static final fun toInstant (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/UtcOffset;Lkotlinx/datetime/DeprecationMarker;)Lkotlinx/time/Instant;
public static synthetic fun toInstant$default (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/TimeZone;Lkotlinx/datetime/DeprecationMarker;ILjava/lang/Object;)Lkotlinx/time/Instant;
public static synthetic fun toInstant$default (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/UtcOffset;Lkotlinx/datetime/DeprecationMarker;ILjava/lang/Object;)Lkotlinx/time/Instant;
public static final fun toLocalDateTime (Lkotlinx/datetime/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/LocalDateTime;
public static final fun toLocalDateTime (Lkotlinx/datetime/Instant;Lkotlinx/datetime/UtcOffset;)Lkotlinx/datetime/LocalDateTime;
public static final fun toLocalDateTime (Lkotlinx/time/Instant;Lkotlinx/datetime/TimeZone;)Lkotlinx/datetime/LocalDateTime;
}

public final class kotlinx/datetime/UtcOffset {
Expand Down Expand Up @@ -504,6 +551,7 @@ public final class kotlinx/datetime/format/DateTimeComponents {
public final fun setDateTime (Lkotlinx/datetime/LocalDateTime;)V
public final fun setDateTimeOffset (Lkotlinx/datetime/Instant;Lkotlinx/datetime/UtcOffset;)V
public final fun setDateTimeOffset (Lkotlinx/datetime/LocalDateTime;Lkotlinx/datetime/UtcOffset;)V
public final fun setDateTimeOffset (Lkotlinx/time/Instant;Lkotlinx/datetime/UtcOffset;)V
public final fun setDayOfMonth (Ljava/lang/Integer;)V
public final fun setDayOfWeek (Ljava/time/DayOfWeek;)V
public final fun setDayOfYear (Ljava/lang/Integer;)V
Expand All @@ -523,6 +571,8 @@ public final class kotlinx/datetime/format/DateTimeComponents {
public final fun setTimeZoneId (Ljava/lang/String;)V
public final fun setYear (Ljava/lang/Integer;)V
public final fun toInstantUsingOffset ()Lkotlinx/datetime/Instant;
public final fun toInstantUsingOffset (Lkotlinx/datetime/DeprecationMarker;)Lkotlinx/time/Instant;
public static synthetic fun toInstantUsingOffset$default (Lkotlinx/datetime/format/DateTimeComponents;Lkotlinx/datetime/DeprecationMarker;ILjava/lang/Object;)Lkotlinx/time/Instant;
public final fun toLocalDate ()Lkotlinx/datetime/LocalDate;
public final fun toLocalDateTime ()Lkotlinx/datetime/LocalDateTime;
public final fun toLocalTime ()Lkotlinx/datetime/LocalTime;
Expand Down
Loading

0 comments on commit 114661d

Please sign in to comment.