Module:Time/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 427:
end
time_string = mw.textlanguage.trim getContentLanguage(os.date):formatDate (cfg.format[df], '@'..timestamp));
local format = {
t12 = '%l:%M %p', -- time only
t24 = '%R',
iso_date ='%F', -- date only
dmy_date = '%e %B %Y',
mdy_date = '%B %e, %Y',
dmy12 = '%l:%M %p, %e %B %Y', -- 12hr time and date
mdy12 = '%l:%M %p, %B %e, %Y',
dmy = '%R, %e %B %Y', -- 24hr time and date
mdy = '%R, %B %e, %Y',
iso = '%FT%R',
dow = '%A' -- day of the week
}
time_string = mw.text.trim (os.date (format[df], timestamp));
 
if not is_set (tz.article) then -- if some but not all not all parts then emit error message