Skip to content

Commit 36062a7

Browse files
committed
Fixes
1 parent 444b968 commit 36062a7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

core/common/src/LocalDate.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ public operator fun LocalDate.minus(period: DatePeriod): LocalDate =
350350
* - Negative or zero if this date is later than the other.
351351
* - Exactly zero if this date is equal to the other.
352352
*
353-
* @throws DateTimeArithmeticException if the number of months between the two dates exceeds an Int.
354-
*
355353
* @see LocalDate.minus for the same operation with the order of arguments reversed.
356354
* @sample kotlinx.datetime.test.samples.LocalDateSamples.periodUntil
357355
*/
@@ -473,7 +471,7 @@ public fun LocalDate.plus(value: Int, unit: DateTimeUnit.DateBased): LocalDate =
473471
* @throws DateTimeArithmeticException if the result exceeds the boundaries of [LocalDate].
474472
* @sample kotlinx.datetime.test.samples.LocalDateSamples.minus
475473
*/
476-
public fun LocalDate.minus(value: Int, unit: DateTimeUnit.DateBased): LocalDate = plus(-value.toLong(), unit)
474+
public fun LocalDate.minus(value: Int, unit: DateTimeUnit.DateBased): LocalDate = plus(-(value.toLong()), unit)
477475

478476
/**
479477
* Returns a [LocalDate] that results from adding the [value] number of the specified [unit] to this date.

core/commonJs/src/internal/Platform.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private fun parseTzdb(): TimeZoneDatabase {
101101
}
102102

103103
internal actual fun currentSystemDefaultZone(): Pair<String, TimeZoneRules?> =
104-
ZoneId.systemDefault().id() to null
104+
ZoneId.systemDefault().id() to null // TODO: make this function with SYSTEM
105105

106106
internal actual fun currentTime(): Instant = Instant.fromEpochMilliseconds(Date().getTime().toLong())
107107

0 commit comments

Comments
 (0)