gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: add file


From: gnunet
Subject: [libeufin] branch master updated: add file
Date: Sat, 11 Jan 2020 11:10:53 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 9a11127  add file
9a11127 is described below

commit 9a111273b44b88809ae4c095bf98dffcfda284c6
Author: Marcello Stanisci <address@hidden>
AuthorDate: Sat Jan 11 11:10:48 2020 +0100

    add file
---
 util/src/main/kotlin/time.kt | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/util/src/main/kotlin/time.kt b/util/src/main/kotlin/time.kt
new file mode 100644
index 0000000..2488118
--- /dev/null
+++ b/util/src/main/kotlin/time.kt
@@ -0,0 +1,19 @@
+package tech.libeufin.util
+
+import java.util.*
+import javax.xml.datatype.DatatypeFactory
+import javax.xml.datatype.XMLGregorianCalendar
+
+/* now */
+fun getGregorianDate(): XMLGregorianCalendar {
+    val gregorianCalendar = GregorianCalendar()
+    val datatypeFactory = DatatypeFactory.newInstance()
+    return datatypeFactory.newXMLGregorianCalendar(gregorianCalendar)
+}
+
+/* explicit point in time */
+fun getGregorianDate(year: Int, month: Int, day: Int): XMLGregorianCalendar {
+    val gregorianCalendar = GregorianCalendar(year, month, day)
+    val datatypeFactory = DatatypeFactory.newInstance()
+    return datatypeFactory.newXMLGregorianCalendar(gregorianCalendar)
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]