Mercurial > prosody-hg
view util/datetime.lua @ 416:7cc2d8a8ae97
Added util-src/hashes.c - support for sha1, sha256 and md5 hashes
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Wed, 26 Nov 2008 01:46:16 +0500 |
| parents | 8ce9559d501a |
| children | cccd610a0ef9 |
line wrap: on
line source
-- 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;
