From 5178fc613b673367ceef2e907cda7c6386f7ac40 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 18 Feb 2019 19:12:10 +0100 Subject: Simplifications for multiplatform Date type. --- .../src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl') diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt index b1f72d6f..678d6828 100644 --- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt +++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt @@ -23,10 +23,10 @@ package pl.treksoft.kvision.types import java.text.SimpleDateFormat -actual val KV_DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss" +val KV_DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss" actual typealias Date = java.util.Date -actual fun String.toDateF(format: String): Date = SimpleDateFormat(format).parse(this) +fun String.toDateF(format: String = KV_DEFAULT_DATE_FORMAT): Date = SimpleDateFormat(format).parse(this) -actual fun Date.toStringF(format: String): String = SimpleDateFormat(format).format(this) +fun Date.toStringF(format: String = KV_DEFAULT_DATE_FORMAT): String = SimpleDateFormat(format).format(this) -- cgit