File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
common/src/aws/smithy/kotlin/runtime/time
jvm/src/aws/smithy/kotlin/runtime/time Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "id" : " 3c662a11-98c2-48cc-8cf5-ca0b293db1f9" ,
3+ "type" : " feature" ,
4+ "description" : " add `MIN` and `MAX` accessors for the Instant type"
5+ }
Original file line number Diff line number Diff line change @@ -68,6 +68,16 @@ public expect class Instant : Comparable<Instant> {
6868 * Create an [Instant] from the current system time
6969 */
7070 public fun now (): Instant
71+
72+ /* *
73+ * Create an [Instant] with the minimum possible value
74+ */
75+ public val MIN_VALUE : Instant
76+
77+ /* *
78+ * Create an [Instant] with the maximum possible value
79+ */
80+ public val MAX_VALUE : Instant
7181 }
7282}
7383
Original file line number Diff line number Diff line change @@ -125,6 +125,16 @@ public actual class Instant(internal val value: jtInstant) : Comparable<Instant>
125125 * Create an [Instant] from the current system time
126126 */
127127 public actual fun now (): Instant = Instant (jtInstant.now())
128+
129+ /* *
130+ * Create an [Instant] with the minimum possible value
131+ */
132+ public actual val MIN_VALUE : Instant = Instant (jtInstant.MIN )
133+
134+ /* *
135+ * Create an [Instant] with the maximum possible value
136+ */
137+ public actual val MAX_VALUE : Instant = Instant (jtInstant.MAX )
128138 }
129139}
130140
You can’t perform that action at this time.
0 commit comments