diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-10-12 18:24:15 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-10-12 18:24:15 +0200 |
commit | 6ea600defefbe16e59c421785d9a09989e672083 (patch) | |
tree | 7f3344b56f9c3fe1f8c65bf67195539a149af15f /src/main/kotlin | |
parent | bcf7504392baccf1568e740c1d453eac7080fb5b (diff) | |
download | kvision-6ea600defefbe16e59c421785d9a09989e672083.tar.gz kvision-6ea600defefbe16e59c421785d9a09989e672083.tar.bz2 kvision-6ea600defefbe16e59c421785d9a09989e672083.zip |
Redesign Date type handling in server side interfaces.
Map js.Date class on the client side to different java.time.* classes on the server side.
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/src/main/kotlin/pl/treksoft/kvision/types/Date.kt index 022eb6a0..165bd723 100644 --- a/src/main/kotlin/pl/treksoft/kvision/types/Date.kt +++ b/src/main/kotlin/pl/treksoft/kvision/types/Date.kt @@ -31,8 +31,19 @@ import kotlin.js.Date const val KV_DEFAULT_DATE_FORMAT = "YYYY-MM-DD HH:mm:ss" +@Deprecated("Compatibility with KVision 1. Use LocalDateTime or OffsetDateTime instead.") actual typealias Date = Date +actual typealias LocalDateTime = Date + +actual typealias LocalDate = Date + +actual typealias LocalTime = Date + +actual typealias OffsetDateTime = Date + +actual typealias OffsetTime = Date + /** * Extension function to convert String to Date with a given date format. * @param format date/time format |