mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-13 09:51:58 -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
|
@ -39,7 +39,7 @@ function mail.show_message(name, id)
|
|||
local cc = minetest.formspec_escape(message.cc) or ""
|
||||
if string.len(cc) > 50 then cc = string.sub(cc, 1, 47) .. "..." end
|
||||
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 ""
|
||||
local subject = minetest.formspec_escape(message.subject) or ""
|
||||
local body = minetest.formspec_escape(message.body) or ""
|
||||
formspec = string.format(formspec, from, to, cc, date, subject, body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue