diff options
author | Tobias Markmann <tm@ayena.de> | 2008-11-15 13:47:17 +0100 |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2008-11-15 13:47:17 +0100 |
commit | efb34b5c4af68c37a568e61986a0b93535a50814 (patch) | |
tree | ba77cb7ad14158323a31bfb9e332c508e94d5b31 /util/datetime.lua | |
parent | 18e785078a2edf69bf4ec728290a18de2ed28cd7 (diff) | |
parent | aefcb845c34c7bf15a370812b28b5da27fbc983b (diff) | |
download | prosody-efb34b5c4af68c37a568e61986a0b93535a50814.tar.gz prosody-efb34b5c4af68c37a568e61986a0b93535a50814.zip |
Merging my new SASL code with Waqas' adjusted saslauth module.
Diffstat (limited to 'util/datetime.lua')
-rw-r--r-- | util/datetime.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/util/datetime.lua b/util/datetime.lua new file mode 100644 index 00000000..077cbb67 --- /dev/null +++ b/util/datetime.lua @@ -0,0 +1,28 @@ +-- XEP-0082: XMPP Date and Time Profiles
+
+local os_date = os.date;
+local error = error;
+
+module "datetime"
+
+function date()
+ return os_date("!%Y-%m-%d");
+end
+
+function datetime()
+ return os_date("!%Y-%m-%dT%H:%M:%SZ");
+end
+
+function time()
+ return os_date("!%H:%M:%S");
+end
+
+function legacy()
+ return os_date("!%Y%m%dT%H:%M:%S");
+end
+
+function parse(s)
+ error("datetime.parse: Not implemented"); -- TODO
+end
+
+return _M;
|