Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
synch from live; |
||
Line 8:
local cfg = {
['default_df'] = 'mdy', -- default date format when |<df> and |df= omitted or empty
['df_vals'] = {
['dmy']=true, ['dmy12']=true, -- also 'y'
['dow']=true,
['mdy']=true, ['mdy12']=true,
['iso']=true,
['ymd']=false, -- not permitted at en.wiki per [[MOS:DATESNO]] - not currently supported
['12']=true, ['24']=true,
['err_msg'] = '<span style="font-size:100%" class="error">{{time}} – $1 ([[Template:Time#Error messages|help]])</span>',
['err_text'] = {
Line 21 ⟶ 25:
['bad_format'] = 'invalid date format $1',
['bad_sign'] = 'invalid use of ±',
['test_time'] = 'malformed or incomplete
['unknown_tz'] = 'unknown timezone $1',
▲ formats = { -- output formatting strings
t12 = 'g:i a', -- time only
t24 = 'H:i',
Line 34 ⟶ 36:
dmy_date = 'j F Y',
mdy_date = 'F j, Y',
dmy12 = 'g:i a, j F Y', -- 12hr time and date
Line 43 ⟶ 45:
iso = 'Y-m-d"T"H:i',
dow = 'l'
},
▲ min = 'i', -- hour or minute only
▲ ---- for dst calculations ----
days = {['sunday'] = 0, ['monday'] = 1, ['tuesday'] = 2, ['wednesday'] = 3, ['thursday'] = 4, ['friday'] = 5, ['saturday'] = 6},
months = {['january'] = 1, ['february'] = 2, ['march'] = 3, ['april'] = 4, ['may'] = 5, ['june'] = 6,
['july'] = 7, ['august'] = 8, ['september'] = 9, ['october'] = 10, ['november'] = 11, ['december'] = 12}; ordinals = {['1st'] = 1, ['first'] = 1, ['2nd'] = 2, ['second'] = 2, ['3rd'] = 3, ['third'] = 3, ['4th'] = 4, ['fourth'] = 4, ['5th'] = 5, ['fifth'] = 5, ['last'] = -1},
aliases = {
['df'] = {'df
['dst'] = {'dst
['dateonly'] = {'dateonly
['timeonly'] = {'timeonly
['hide-refresh'] = {'hide
['hide-tz'] = {'hide
['unlink-tz'] = {'unlink-tz
}
}
--[[--------------------------< A L I A S E S >----------------------------------------------------------------
Line 77 ⟶ 75:
['irish standard time'] = 'gmt-ie',
['usz1'] = 'kalt', -- old form Kaliningrad time
['at'] = 'ast', -- alternate abbreviations west of utc▼
['et'] = 'est',▼
['ct'] = 'cst',▼
['pt'] = 'pst',▼
['akt'] = 'akst',▼
['hst'] = 'hast',▼
['west'] = 'wet', -- dst aliases east of utc
Line 98 ⟶ 82:
['aedt'] = 'aest',
['nzdt'] = 'nzst',
▲ ['at'] = 'ast', -- alternate abbreviations west of utc
▲ ['et'] = 'est',
▲ ['ct'] = 'cst',
▲ ['pt'] = 'pst',
▲ ['akt'] = 'akst',
▲ ['hst'] = 'hast',
['pmdt'] = 'pmst', -- dst aliases west of utc
Line 109 ⟶ 100:
['akdt'] = 'akst',
['hdt'] = 'hast',
}
Line 666 ⟶ 657:
cfg = cfg,
tz_aliases = tz_aliases,
tz_data = tz_data,
}
|