jbe/bsw@0: --[[-- jbe/bsw@0: text = -- text with the given timestamp value formatted according to the locale settings jbe/bsw@0: format.timestamp( jbe/bsw@0: value, -- a timestamp or nil jbe/bsw@0: { jbe/bsw@0: nil_as = nil_text -- text to be returned for a nil value jbe/bsw@0: } jbe/bsw@0: ) jbe/bsw@0: jbe/bsw@0: Formats a timestamp according to the locale settings. jbe/bsw@0: jbe/bsw@0: --]]-- jbe/bsw@0: jbe/bsw@0: function format.timestamp(value, options) jbe/bsw@0: if value == nil then jbe/bsw@0: return options.nil_as or "" jbe/bsw@0: end jbe/bsw@0: return format.date(value, options) .. " " .. format.time(value, options) jbe/bsw@0: end