ਮੌਡਿਊਲ:Time/data
ਦਿੱਖ
This module stores data relating to timezone that is used by Module:Time or any other module and templates that need it.
--[[--------------------------< C O N F I G U R A T I O N D A T A >------------------------------------------
for internationalization, this section to hold constant text, parameter names and values, other items subject to
language translation
]]
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,
['y']=true, -- also 'dmy' and 'dmy12'
['12']=true,
['24']=true,
};
['err_msg'] = '<span style="font-size:100%" class="error">{{time}} – $1 ([[Template:Time#Error messages|help]])</span>',
['err_text'] = {
['bad_def'] = 'incomplete definition for $1',
['bad_df_pair'] = 'both of |df-cust-a= and |df-cust-p required',
['bad_dst'] = 'error calculating dst timestamps',
['bad_format'] = 'invalid date format $1',
['bad_sign'] = 'invalid use of ±',
['test_time'] = 'malformed or incomplete _TEST_TIME_',
['unknown_tz'] = 'unknown timezone $1',
},
['format'] = { -- output formatting strings
t12 = 'g:i a', -- time only
t24 = 'H:i',
iso_date ='Y-m-d', -- date only
dmy_date = 'j F Y',
mdy_date = 'F j, Y',
dmy12 = 'g:i a, j F Y', -- 12hr time and date
mdy12 = 'g:i a, F j, Y',
dmy = 'H:i, j F Y', -- 24hr time and date
mdy = 'H:i, F j, Y',
iso = 'Y-m-d"T"H:i',
dow = 'l' -- day of the week
},
['refresh-label'] = 'ਤਾਜ਼ਾ ਕਰੋ',
-- 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},
-- parameter list
aliases = {
['dateonly'] = {'dateonly'},
['df'] = {'df'},
['df-cust'] = {'df-cust'},
['df-cust-a'] = {'df-cust-a'},
['df-cust-p'] = {'df-cust-p'},
['dst'] = {'dst'},
['hide-refresh'] = {'hide-refresh'},
['hide-tz'] = {'hide-tz'},
['lang'] = {'lang'},
['timeonly'] = {'timeonly'},
['unlink-tz'] = {'unlink-tz'},
}
}
--[[--------------------------< A L I A S E S >----------------------------------------------------------------
]]
local tz_aliases = {
['british summer time'] = 'gmt-uk',
['irish standard time'] = 'gmt-ie',
['usz1'] = 'kalt', -- old form Kaliningrad time
['west'] = 'wet', -- dst aliases east of utc
['cest'] = 'cet',
['eest'] = 'eet',
['acdt'] = 'acst',
['aedt'] = 'aest',
['nzdt'] = 'nzst',
['at'] = 'ast', -- alternate abbreviations west of utc
['et'] = 'est',
['ct'] = 'cst',
['pt'] = 'pst',
['akt'] = 'akst',
['hast'] = 'hst',
['pmdt'] = 'pmst', -- dst aliases west of utc
['wgst'] = 'wgt',
['ndt'] = 'nst',
['adt'] = 'ast',
['edt'] = 'est',
['cdt'] = 'cst',
['mdt'] = 'mst',
['pdt'] = 'pst',
['akdt'] = 'akst',
['hdt'] = 'hst',
['hadt'] = 'hst',
}
--[[--------------------------< T I M E Z O N E D A T A >----------------------------------------------------
When specifying utc offset do not use the minus character (U+2212) for offsets west of 0 meridian; use the minus-hyphen
]]
local tz_data = {
------------------------------< E A S T U T C + H H : M M >--------------------------------------------------
['utc'] = {
abbr = 'UTC', -- (required) abbreviation to use during standard time
dst_abbr = '', -- abbreviation to use during daylight saving time
utc_offset = '00:00', -- (required) hours and minutes offset from UTC for this timezone; '+' is optional; '-' (hyphen-minus) is required for timezones west of 0 meridian
df = 'dmy', -- date format typically used in the time zone
dst_begins = '', -- daylight saving begins; e.g. 2nd Sunday in March; also last; empty string if not observed
dst_ends = '', -- (required if dst_begins is set) daylight saving ends; e.g. 1st Sunday in November; ignored if dst_begins not set
dst_time = '', -- (required if dst_begins is set) local time on the day that dst begins/ends; for EU DST rules specify utc time: e.g.: '01:00 UTC'
dst_e_time = '', -- local daylight saving time on the day that dst ends; only when different from dst_time; see acst for an example
article = 'Coordinated Universal Time' -- (required) name of related Wikipedia article without markup
},
['gmt'] = {
abbr = 'GMT',
dst_abbr = '',
utc_offset = '00:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Greenwich Mean Time'
},
['gmt-uk'] = {
abbr = 'GMT',
dst_abbr = 'BST', -- British Summer Time
utc_offset = '00:00',
df = 'dmy',
dst_begins = 'last Sunday of March',
dst_ends = 'last Sunday of October',
dst_time = '01:00 UTC', -- 01:00 standard time is same as 01:00 UTC
article = 'Time in the United Kingdom'
},
['gmt-ie'] = { -- ist is shared with Indian Standard Time so use gmt-ie
abbr = 'GMT', -- winter time
dst_abbr = 'IST', -- Irish Standard Time occurs in summer
utc_offset = '00:00',
df = 'dmy',
dst_begins = 'last Sunday of March',
dst_ends = 'last Sunday of October',
dst_time = '01:00 UTC', -- 01:00 standard time is same as 01:00 UTC
article = 'Time in Ireland'
},
['wet'] = {
abbr = 'WET',
dst_abbr = 'WEST',
utc_offset = '00:00',
df = 'dmy',
dst_begins = 'last Sunday of March',
dst_ends = 'last Sunday of October',
dst_time = '01:00 UTC', -- 01:00 standard time is same as 01:00 UTC
article = 'Western European Time'
},
['cet'] = {
abbr = 'CET',
dst_abbr = 'CEST',
utc_offset = '01:00',
df = 'dmy',
dst_begins = 'last Sunday of March',
dst_ends = 'last Sunday of October',
dst_time = '01:00 UTC', -- 02:00 standard time is same as 01:00 UTC
article = 'Central European Time'
},
['eet'] = {
abbr = 'EET',
dst_abbr = 'EEST',
utc_offset = '02:00',
df = 'dmy',
dst_begins = 'last Sunday of March',
dst_ends = 'last Sunday of October',
dst_time = '01:00 UTC', -- 03:00 standard time is same as 01:00 UTC
article = 'Eastern European Time'
},
['kalt'] = {
abbr = 'KALT',
dst_abbr = '',
utc_offset = '02:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Kaliningrad Time'
},
['sast'] = {
abbr = 'SAST',
dst_abbr = '',
utc_offset = '02:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
dst_e_time = '',
article = 'South African Standard Time'
},
['msk'] = {
abbr = 'MSK',
dst_abbr = '',
utc_offset = '03:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Moscow Time'
},
['samt'] = {
abbr = 'SAMT',
dst_abbr = '',
utc_offset = '04:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Samara Time'
},
['mvt'] = {
abbr = 'MVT',
dst_abbr = '',
utc_offset = '05:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Time in Maldives'
},
['pkt'] = {
abbr = 'PKT',
dst_abbr = '',
utc_offset = '05:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Pakistan Standard Time'
},
['yekt'] = {
abbr = 'YEKT',
dst_abbr = '',
utc_offset = '05:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Yekaterinburg Time'
},
['ist'] = {
abbr = 'IST',
utc_offset = '05:30',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'ਭਾਰਤੀ ਮਿਆਰੀ ਸਮਾਂ'
},
['slst'] = {
abbr = 'SLST',
utc_offset = '05:30',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Sri Lanka Standard Time'
},
['npt'] = {
abbr = 'NPT',
dst_abbr = '',
utc_offset = '05:45',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Nepal Time'
},
['bst'] = {
abbr = 'BST',
utc_offset = '06:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Bangladesh Standard Time'
},
['omst'] = {
abbr = 'OMST',
dst_abbr = '',
utc_offset = '06:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Omsk Time'
},
['mmt'] = {
abbr = 'MMT',
dst_abbr = '',
utc_offset = '06:30',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Myanmar Standard Time'
},
['krat'] = {
abbr = 'KRAT',
dst_abbr = '',
utc_offset = '07:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Krasnoyarsk Time'
},
['wib'] = { -- western indonesia
abbr = 'WIB',
dst_abbr = '',
utc_offset = '07:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Time in Indonesia'
},
['awst'] = {
abbr = 'AWST',
dst_abbr = '',
utc_offset = '08:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Time in Australia'
},
['bt'] = { -- same as China standard time (CST)
abbr = 'BT',
dst_abbr = '',
utc_offset = '08:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Time in China'
},
['irkt'] = {
abbr = 'IRKT',
dst_abbr = '',
utc_offset = '08:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Irkutsk Time'
},
['sst'] = {
abbr = 'SST',
dst_abbr = '',
utc_offset = '08:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Singapore Standard Time',
},
['wita'] = { -- central
abbr = 'WITA',
dst_abbr = '',
utc_offset = '08:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Time in Indonesia'
},
['jst'] = {
abbr = 'JST',
dst_abbr = '',
utc_offset = '09:00',
df = 'iso',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Japan Standard Time'
},
['kst'] = {
abbr = 'KST',
dst_abbr = '',
utc_offset = '09:00',
df = 'iso',
dst_begins = '',
dst_ends = '',
dst_time = '',
dst_e_time = '',
article = 'Time in South Korea'
},
['wit'] = { -- eastern Indonesia (same as old template's eit)
abbr = 'WIT',
dst_abbr = '',
utc_offset = '09:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Time in Indonesia'
},
['yakt'] = {
abbr = 'YAKT',
dst_abbr = '',
utc_offset = '09:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Yakutsk Time'
},
['acst'] = { -- Northern Territory, South Australia time
abbr = 'ACST',
dst_abbr = 'ACDT',
utc_offset = '09:30',
df = 'dmy',
dst_begins = 'first Sunday in October',
dst_ends = 'first Sunday in April',
dst_time = '02:00',
dst_e_time = '03:00',
article = 'Time in Australia'
},
['aest'] = { -- QLD, NSW, TAS, VIC, ACT
abbr = 'AEST',
dst_abbr = 'AEDT',
utc_offset = '10:00',
df = 'dmy',
dst_begins = 'first Sunday in October',
dst_ends = 'first Sunday in April',
dst_time = '02:00', -- begins at 02:00 AEST
dst_e_time = '03:00', -- ends at 02:00 AEST which is 03:00 AEDT
article = 'Time in Australia'
},
['chst'] = {
abbr = 'ChST',
dst_abbr = '',
utc_offset = '10:00',
df = 'mdy', -- because a US territory?
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Chamorro Time Zone'
},
['vlat'] = {
abbr = 'VLAT',
dst_abbr = '',
utc_offset = '10:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Vladivostok Time'
},
['sret'] = {
abbr = 'SRET',
dst_abbr = '',
utc_offset = '11:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Srednekolymsk Time'
},
['nzst'] = {
abbr = 'NZST',
dst_abbr = 'NZDT',
utc_offset = '12:00',
df = 'dmy',
dst_begins = 'last Sunday in September',
dst_ends = 'first Sunday in April',
dst_time = '02:00', -- begins at 02:00 NZST
dst_e_time = '03:00', -- ends at 02:00 NZST which is 03:00 NZDT
article = 'Time in New Zealand'
},
['pett'] = {
abbr = 'PETT',
dst_abbr = '',
utc_offset = '12:00',
df = 'dmy',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Kamchatka Time'
},
['idle'] = { -- international dateline east
abbr = 'IDLE',
dst_abbr = '',
utc_offset = '12:00',
df = 'iso',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'UTC+12:00'
},
------------------------------< W E S T U T C - H H : M M >--------------------------------------------------
['pmst'] = {
abbr = 'PMST',
dst_abbr = 'PMDT',
utc_offset = '-03:00',
df = 'dmy', -- because France
dst_begins = '2nd Sunday in March', -- North American rules
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'UTC−03:00'
},
['wgt'] = { -- western greenland time? Not for Thule Airbase which observes US DST rules; requires own properties
abbr = 'WGT',
dst_abbr = 'WGST', -- ??? what is the correct abbreviation?
utc_offset = '-03:00',
df = 'dmy',
dst_begins = 'last Sunday in March',
dst_ends = 'last Sunday in October',
dst_time = '01:00 UTC',
article = 'Time in Denmark'
},
['nst'] = {
abbr = 'NST',
dst_abbr = 'NDT',
utc_offset = '-03:30',
df = 'dmy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Newfoundland Standard Time'
},
['ast'] = {
abbr = 'AST',
dst_abbr = 'ADT',
utc_offset = '-04:00',
df = 'dmy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Atlantic Time Zone'
},
['est'] = {
abbr = 'EST',
dst_abbr = 'EDT',
utc_offset = '-05:00',
df = 'mdy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Eastern Time Zone'
},
['cst'] = {
abbr = 'CST',
dst_abbr = 'CDT',
utc_offset = '-06:00',
df = 'mdy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Central Time Zone'
},
['mst'] = {
abbr = 'MST',
dst_abbr = 'MDT',
utc_offset = '-07:00',
df = 'mdy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Mountain Time Zone'
},
['pst'] = {
abbr = 'PST',
dst_abbr = 'PDT',
utc_offset = '-08:00',
df = 'mdy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Pacific Time Zone'
},
['akst'] = {
abbr = 'AKST',
dst_abbr = 'AKDT',
utc_offset = '-09:00',
df = 'mdy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Alaska Time Zone'
},
['hst'] = { -- same as AleutST and HAST
abbr = 'HST',
dst_abbr = 'HDT',
utc_offset = '-10:00',
df = 'mdy',
dst_begins = '2nd Sunday in March',
dst_ends = '1st Sunday in November',
dst_time = '02:00',
article = 'Hawaii–Aleutian Time Zone'
},
['idlw'] = { -- international dateline west
abbr = 'IDLW',
dst_abbr = '',
utc_offset = '-12:00',
df = 'iso',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'UTC−12:00'
},
['aoe'] = { -- last location for any date
abbr = 'AoE',
dst_abbr = '',
utc_offset = '-12:00',
df = 'iso',
dst_begins = '',
dst_ends = '',
dst_time = '',
article = 'Anywhere on Earth'
},
------------------------------< M I L I T A R Y >--------------------------------------------------------------
-- {{cite web |url=http://wwp.greenwichmeantime.com/info/timezone.htm |title=Military and Civilian Time Designations |accessdate=2016-03-25 |website=Greenwich Mean Time}}
--http://astro.ukho.gov.uk/nao/miscellanea/WMTZ/Wmtz160224.pdf
['a'] = {abbr = 'A', utc_offset = '01:00', df = 'iso', article = 'List of military time zones'},
['b'] = {abbr = 'B', utc_offset = '02:00', df = 'iso', article = 'List of military time zones'},
['c'] = {abbr = 'C', utc_offset = '03:00', df = 'iso', article = 'List of military time zones'},
['c*'] = {abbr = 'C*', utc_offset = '03:30', df = 'iso', article = 'List of military time zones'},
['d'] = {abbr = 'D', utc_offset = '04:00', df = 'iso', article = 'List of military time zones'},
['d*'] = {abbr = 'D*', utc_offset = '04:30', df = 'iso', article = 'List of military time zones'},
['e'] = {abbr = 'E', utc_offset = '05:00', df = 'iso', article = 'List of military time zones'},
['e*'] = {abbr = 'E*', utc_offset = '05:30', df = 'iso', article = 'List of military time zones'},
['e+'] = {abbr = 'E†', utc_offset = '05:45', df = 'iso', article = 'List of military time zones'},
['f'] = {abbr = 'F', utc_offset = '06:00', df = 'iso', article = 'List of military time zones'},
['f*'] = {abbr = 'F*', utc_offset = '06:30', df = 'iso', article = 'List of military time zones'},
['g'] = {abbr = 'G', utc_offset = '07:00', df = 'iso', article = 'List of military time zones'},
['h'] = {abbr = 'H', utc_offset = '08:00', df = 'iso', article = 'List of military time zones'},
['h*'] = {abbr = 'H*', utc_offset = '08:30', df = 'iso', article = 'List of military time zones'},
['i'] = {abbr = 'I', utc_offset = '09:00', df = 'iso', article = 'List of military time zones'},
['i*'] = {abbr = 'I*', utc_offset = '09:30', df = 'iso', article = 'List of military time zones'},
['k'] = {abbr = 'K', utc_offset = '10:00', df = 'iso', article = 'List of military time zones'},
['k*'] = {abbr = 'K*', utc_offset = '10:30', df = 'iso', article = 'List of military time zones'},
['l'] = {abbr = 'L', utc_offset = '11:00', df = 'iso', article = 'List of military time zones'},
['l*'] = {abbr = 'L*', utc_offset = '11:30', df = 'iso', article = 'List of military time zones'},
['m'] = {abbr = 'M', utc_offset = '12:00', df = 'iso', article = 'List of military time zones'},
['m++'] = {abbr = 'M‡', utc_offset = '12:45', df = 'iso', article = 'List of military time zones'},
['m*'] = {abbr = 'M*', utc_offset = '13:00', df = 'iso', article = 'List of military time zones'},
['m+'] = {abbr = 'M†', utc_offset = '14:00', df = 'iso', article = 'List of military time zones'},
['n'] = {abbr = 'N', utc_offset = '-01:00', df = 'iso', article = 'List of military time zones'},
['o'] = {abbr = 'O', utc_offset = '-02:00', df = 'iso', article = 'List of military time zones'},
['p'] = {abbr = 'P', utc_offset = '-03:00', df = 'iso', article = 'List of military time zones'},
['p*'] = {abbr = 'P*', utc_offset = '-03:30', df = 'iso', article = 'List of military time zones'},
['q'] = {abbr = 'Q', utc_offset = '-04:00', df = 'iso', article = 'List of military time zones'},
['q*'] = {abbr = 'Q*', utc_offset = '-04:30', df = 'iso', article = 'List of military time zones'},
['r'] = {abbr = 'R', utc_offset = '-05:00', df = 'iso', article = 'List of military time zones'},
['s'] = {abbr = 'S', utc_offset = '-06:00', df = 'iso', article = 'List of military time zones'},
['t'] = {abbr = 'T', utc_offset = '-07:00', df = 'iso', article = 'List of military time zones'},
['u'] = {abbr = 'U', utc_offset = '-08:00', df = 'iso', article = 'List of military time zones'},
['u*'] = {abbr = 'U*', utc_offset = '-08:30', df = 'iso', article = 'List of military time zones'},
['v'] = {abbr = 'V', utc_offset = '-09:00', df = 'iso', article = 'List of military time zones'},
['v*'] = {abbr = 'V*', utc_offset = '-09:30', df = 'iso', article = 'List of military time zones'},
['w'] = {abbr = 'W', utc_offset = '-10:00', df = 'iso', article = 'List of military time zones'},
['x'] = {abbr = 'X', utc_offset = '-11:00', df = 'iso', article = 'List of military time zones'},
['y'] = {abbr = 'Y', utc_offset = '-12:00', df = 'iso', article = 'List of military time zones'},
['z'] = {abbr = 'Z', utc_offset = '±00:00', df = 'iso', article = 'List of military time zones'},
------------------------------< U T C O F F S E T S >--------------------------------------------------------
-- this table entry filled by the code in time()
['utc_offsets'] = {abbr = '', utc_offset = '', df = 'iso', article = ''},
}; -- end of tz_data table
--[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------
]]
return {
cfg = cfg,
tz_aliases = tz_aliases,
tz_data = tz_data,
}