Could remove unused date time extensions
This commit is contained in:
parent
469ee275c9
commit
f17c9bb781
|
@ -1,25 +0,0 @@
|
|||
package net.codinux.banking.client.model.extensions
|
||||
|
||||
import kotlinx.datetime.*
|
||||
import kotlin.js.JsName
|
||||
|
||||
val UnixEpochStart: LocalDate = LocalDate.parse("1970-01-01")
|
||||
|
||||
|
||||
fun LocalDate.Companion.todayAtSystemDefaultTimeZone(): LocalDate {
|
||||
return nowAt(TimeZone.currentSystemDefault())
|
||||
}
|
||||
|
||||
fun LocalDate.Companion.todayAtEuropeBerlin(): LocalDate {
|
||||
return nowAt(TimeZone.europeBerlin)
|
||||
}
|
||||
|
||||
@JsName("nowAtForDate")
|
||||
fun LocalDate.Companion.nowAt(timeZone: TimeZone): LocalDate {
|
||||
return Clock.System.todayIn(timeZone)
|
||||
}
|
||||
|
||||
|
||||
fun LocalDate.minusDays(days: Int): LocalDate {
|
||||
return this.minus(days, DateTimeUnit.DAY)
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package net.codinux.banking.client.model.extensions
|
||||
|
||||
import kotlinx.datetime.*
|
||||
|
||||
|
||||
fun LocalDateTime.Companion.nowAtUtc(): LocalDateTime {
|
||||
return nowAt(TimeZone.UTC)
|
||||
}
|
||||
|
||||
fun LocalDateTime.Companion.nowAtEuropeBerlin(): LocalDateTime {
|
||||
return nowAt(TimeZone.europeBerlin)
|
||||
}
|
||||
|
||||
fun LocalDateTime.Companion.nowAt(timeZone: TimeZone): LocalDateTime {
|
||||
return Clock.System.now().toLocalDateTime(timeZone)
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package net.codinux.banking.client.model.extensions
|
||||
|
||||
import kotlinx.datetime.TimeZone
|
||||
|
||||
|
||||
val TimeZone.Companion.europeBerlin: TimeZone
|
||||
get() = TimeZone.of("Europe/Berlin")
|
Loading…
Reference in New Issue