Software /
code /
prosody
Comparison
util/datetime.lua @ 282:80e7de32b618
Merging my new SASL code with Waqas' adjusted saslauth module.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sat, 15 Nov 2008 13:47:17 +0100 |
parent | 248:8ce9559d501a |
child | 519:cccd610a0ef9 |
comparison
equal
deleted
inserted
replaced
280:516f4c901991 | 282:80e7de32b618 |
---|---|
1 -- XEP-0082: XMPP Date and Time Profiles | |
2 | |
3 local os_date = os.date; | |
4 local error = error; | |
5 | |
6 module "datetime" | |
7 | |
8 function date() | |
9 return os_date("!%Y-%m-%d"); | |
10 end | |
11 | |
12 function datetime() | |
13 return os_date("!%Y-%m-%dT%H:%M:%SZ"); | |
14 end | |
15 | |
16 function time() | |
17 return os_date("!%H:%M:%S"); | |
18 end | |
19 | |
20 function legacy() | |
21 return os_date("!%Y%m%dT%H:%M:%S"); | |
22 end | |
23 | |
24 function parse(s) | |
25 error("datetime.parse: Not implemented"); -- TODO | |
26 end | |
27 | |
28 return _M; |