Content deleted Content added
BrandonXLF (talk | contribs) Looks good |
No edit summary |
||
Line 307:
if args[1] then
args[1] = get_full_utc_offset (args[1]):lower(); -- make lower case because tz table member indexes are lower case
else
args[1] = 'utc'; -- default to utc
Line 323 ⟶ 322:
args[1] = 'utc_offsets'; -- spoof to show that we recognize this timezone
else
tz = tz_data[args[1]]
if not
return '<span style="font-size:100%" class="error">{{time}} – unknown timezone ([[Template:Time#Error messages|help]])</span>'; -- if the timezone given isn't in module:time/data(/sandbox)
end
end
local df_vals = {['dmy']=true, ['dmy12']=true, ['dow']=true, ['mdy']=true, ['mdy12']=true, ['iso']=true, ['y']=true, ['12']=true, ['24']=true}; -- TODO: move this table to /data
df = args.df or args[2] or tz.df or 'mdy'; -- template |df= overrides typical df from tz properties
if is_set (df) then▼
return '<span style="font-size:100%" class="error">{{time}} – invalid date format ([[Template:Time#Error messages|help]])</span>';
end
Line 343 ⟶ 341:
end
utc_timestamp = os.time(test_time);
else
|