jbe/bsw@0: --[[-- jbe@108: text = -- text with the given timestamp value formatted according to the locale settings jbe/bsw@0: format.timestamp( jbe@108: value, -- a timestamp or nil jbe/bsw@0: { jbe@108: nil_as = nil_text, -- text to be returned for a nil value jbe@108: hide_seconds = hide_seconds -- set to TRUE to hide seconds 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@530: return options and options.nil_as or "" jbe/bsw@0: end jbe/bsw@0: return format.date(value, options) .. " " .. format.time(value, options) jbe/bsw@0: end