diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-05-04 23:17:22 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-05-04 23:17:22 +0200 |
commit | dd167ecd2b328c0daced71233e633d03153d5819 (patch) | |
tree | 63b50e3ffc32dd8f5c4f8066dd8597f12d0194bf /src/main/kotlin/pl/treksoft/kvision/utils | |
parent | d400027d2a86b53ffe5124f33b42df29d06196b1 (diff) | |
download | kvision-dd167ecd2b328c0daced71233e633d03153d5819.tar.gz kvision-dd167ecd2b328c0daced71233e633d03153d5819.tar.bz2 kvision-dd167ecd2b328c0daced71233e633d03153d5819.zip |
Copyright comments unification
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/utils')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt b/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt index 5ae9a601..a1901c35 100644 --- a/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt +++ b/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt @@ -188,8 +188,9 @@ fun Int.toHexString(): String { * @return Date object */ @Suppress("UnsafeCastFromDynamic") -fun String.toDateF(format: String = "YYYY-MM-DD HH:mm:ss"): Date { - return KVManager.fecha.parse(this, format) +fun String.toDateF(format: String = "YYYY-MM-DD HH:mm:ss"): Date? { + val result = KVManager.fecha.parse(this, format) + return if (result) result else null } /** |