mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-14 02:11:55 -04:00
Add a setting to choose date format
This commit is contained in:
parent
db2434c8f9
commit
be8f0e590f
12 changed files with 238 additions and 212 deletions
|
@ -31,7 +31,7 @@ function mail.show_receivers(name, id)
|
|||
local cc_str = mail.colors.header .. "," .. S("CC") .. ",,"
|
||||
cc_str = cc_str .. table.concat(cc, ",,")
|
||||
local date = type(message.time) == "number"
|
||||
and minetest.formspec_escape(os.date("%Y-%m-%d %X", message.time)) or ""
|
||||
and minetest.formspec_escape(os.date(mail.get_setting(name, "date_format"), message.time)) or ""
|
||||
formspec = string.format(formspec, from, date, to_str, cc_str)
|
||||
|
||||
minetest.show_formspec(name, FORMNAME, formspec)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue