aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/utils
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-05-04 23:17:22 +0200
committerRobert Jaros <rjaros@finn.pl>2018-05-04 23:17:22 +0200
commitdd167ecd2b328c0daced71233e633d03153d5819 (patch)
tree63b50e3ffc32dd8f5c4f8066dd8597f12d0194bf /src/main/kotlin/pl/treksoft/kvision/utils
parentd400027d2a86b53ffe5124f33b42df29d06196b1 (diff)
downloadkvision-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.kt5
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
}
/**