[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: parse dashed date
From: |
gnunet |
Subject: |
[libeufin] branch master updated: parse dashed date |
Date: |
Mon, 25 May 2020 17:21:00 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new d530bd9 parse dashed date
d530bd9 is described below
commit d530bd9c9526e130561bb346a280215b38a89f13
Author: MS <address@hidden>
AuthorDate: Mon May 25 17:20:56 2020 +0200
parse dashed date
---
util/src/test/kotlin/TimeTest.kt | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/util/src/test/kotlin/TimeTest.kt b/util/src/test/kotlin/TimeTest.kt
index 1b9183e..1bd96fe 100644
--- a/util/src/test/kotlin/TimeTest.kt
+++ b/util/src/test/kotlin/TimeTest.kt
@@ -1,6 +1,7 @@
import org.junit.Test
import java.time.*
import java.time.format.DateTimeFormatter
+import java.time.temporal.TemporalAccessor
class TimeTest {
@Test
@@ -25,9 +26,19 @@ class TimeTest {
val dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME
return dtf.format(dateTime)
}
- val str = formatDashed(LocalDateTime.now())
+ val str = formatDashed(LocalDateTime.now())
println(str)
val str0 =
formatZonedWithOffset(LocalDateTime.now().atZone(ZoneId.systemDefault()))
println(str0)
}
+
+ @Test
+ fun parseDashedDate() {
+ fun parse(dashedDate: String): LocalDate {
+ val dtf = DateTimeFormatter.ISO_LOCAL_DATE
+ return LocalDate.parse(dashedDate, dtf)
+ }
+ val ret = parse("1970-01-01")
+ println(ret.toString())
+ }
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: parse dashed date,
gnunet <=