webmcp
view framework/env/format/timestamp.lua @ 506:83b3882dc31b
New functions moonhash.shake128(data, len, alphabet), moonhash.shake256(data, len, alphabet)
Removed moonhash.shake128_128(...)
Removed moonhash.shake128_128(...)
author | jbe |
---|---|
date | Wed Aug 16 00:31:11 2017 +0200 (2017-08-16) |
parents | 08c107cc4fce |
children | 6dec66f8d48e |
line source
1 --[[--
2 text = -- text with the given timestamp value formatted according to the locale settings
3 format.timestamp(
4 value, -- a timestamp or nil
5 {
6 nil_as = nil_text, -- text to be returned for a nil value
7 hide_seconds = hide_seconds -- set to TRUE to hide seconds
8 }
9 )
11 Formats a timestamp according to the locale settings.
13 --]]--
15 function format.timestamp(value, options)
16 if value == nil then
17 return options.nil_as or ""
18 end
19 return format.date(value, options) .. " " .. format.time(value, options)
20 end