တမ်းပလိတ်:Time/doc
ဤစာမျက်နှာမှာ တမ်းပလိတ်:Time တမ်းပလိတ်အတွက် အသုံးပြုပုံ လက်စွဲ (documentation) ၏ စာမျက်နှာခွဲ (subpage) တစ်ခုဖြစ်သည်။ ဤစာမျက်နှာတွင် မူရင်း တမ်းပလိတ် page ၌ တစိတ်တပိုင်းအဖြစ် မပါဝင်သည့် အသုံးပြုပုံပြုနည်းနှင့် သက်ဆိုင်သည့် သတင်းအချက်များ၊ ကဏ္ဍများ နှင့် အခြားအချက်အလက်များ ပါဝင်သည်။ |
Uses Lua: |
{{Time}}
is an update to {{time/old}}
. Like {{time/old}}
, this template displays the current time in a parameter-specified time zone. The time is calculated based on the offset from UTC for the specified time zone taking into account whether daylight saving time is currently active in that time zone. Unlike {{time/old}}
which uses multiple small independent templates to accomplish its various tasks, {{time}}
uses the single Module:Time.
Note: Most Wikipedia pages display a cached version of the page to reduce server load, so the template will only display the current time as of when the page was last parsed. You can refresh the displayed time by clicking the [refresh] link.
ပါရာမီတာများ
ပြင်ဆင်ရန်{{time}}
supports two positional and three named parameters; none are required:
|<time zone>
– the first positional (unnamed) parameter, specifies the time zone for which the template is to provide a time output. If omitted, the template displays UTC time. A time zone is identified by an abbreviation of the time zone's standard-time name. Do not use a summertime or daylight saving time abbreviation; they will be ignored and produce an error message.|<df>
– the positional (unnamed) version of|df=
which see|df=
– date format; an expanded version of the same parameter used in{{time}}
. This parameter takes one of four values; values other than these are ignored:|df=dmy
– specifies day month year date format|df=mdy
– specifies month day, year format; default when a date format is not specified in the time zone's properties|df=iso
– renders the date/time in a form roughly adhering to the ISO 8601 format (seconds omitted)|df=y
– legacy{{time}}
parameter, same as|df=dmy
|dst=
– when set tono
, disables the daylight saving time calculation for the time zone; other values ignored; useful for locations within a time zone that do not observe daylight saving time; Arizona, for example|_TEST_TIME_=
– a parameter that was useful during the development of the template's code. The value assigned to this parameter must be in ISO 8601 format without time zone designator and is interpreted by the template as UTC
အသုံးပြုပုံ
ပြင်ဆင်ရန်Typically, all that is needed is:
{{time|<TZ>}}
where<TZ>
is one of the supported time zone abbreviations
To change the rendered format:
{{time|MST|df=y}}
{{time|MST|y}}
{{time|MST|dmy}}
{{time|MST|iso}}
ထောက်ပံ့သည့် အချိန်ဇုန်များ
ပြင်ဆင်ရန်This is a list of the currently supported time zone abbreviations:
- ACST
- AEST
- AKST
- AoE[upper-alpha ၁]
- AST
- AWST
- BST
- BT
- CET
- ChST
- CST
- EET
- EST
- GMT
- GMT-IE[upper-alpha ၂]
- GMT-UK[upper-alpha ၃]
- HAST
- IDLE[upper-alpha ၁]
- IDLW[upper-alpha ၁]
- IRKT
- IST
- JST
- KRAT
- MSK
- MST
- NST
- NZST
- OMST
- PETT
- PMST[upper-alpha ၄]
- PST
- SAMT
- SRET
- USZ1
- UTC
- VLAT
- WET
- WGT[upper-alpha ၅]
- WIB
- WIT
- WITA
- YAKT
- YEKT
- ↑ ၁.၀ ၁.၁ ၁.၂ Not standard time zones, these are included on a whim of the programmer; AoE is 'Anywhere on Earth', 'IDLE' and 'IDLW' are International Date Line East and West
- ↑ Irish Standard Time. The abbreviation, IST, is also used for Indian Standard Time. Irish Standard Time occurs in the summer. For these reasons, the template uses GMT-IE as the time zone abbreviation for Ireland.
- ↑ GMT does not observe daylight saving time. In the United Kingdom GMT is observed in winter but shifts to British Summer Time. The abbreviation BST is also used by Bangladesh Standard Time. To differentiate year-round GMT from GMT as observed in the UK, use GMT-UK.
- ↑ Saint-Pierre and Miquelon Standard Time
- ↑ Western Greenland Time
UTC offset
ပြင်ဆင်ရန်To display the time at a particular UTC offset, specify the UTC time offset as the time zone:
'UTC', a sign character, two hour digits, a colon, and two minute digits are required. Accepted sign characters are: '+', '-' (hyphen), '±', and '−' (minus).
Military/nautical time zones
ပြင်ဆင်ရန်To display the time at a particular military or nautical time zone,[၁] use the time zone's alpha designation:
Some military and nautical time zone designators are extended with an asterisk (*), a dagger (†), or double dagger (‡). When writing this template for designators that are extended with a dagger or double dagger, use '+' and '++' respectively:
Daylight saving time
ပြင်ဆင်ရန်Daylight saving time (DST) calculations are automatic for those time zones where it is observed. There are locales that do not observe DST within time zones where it is generally observed. To render the correct time for a non-observant locale, set |dst=no
:
{{time|MST|dst=no}}
- 02:03, December 16, 2024 MST [refresh] – time in Arizona
{{time|MST}}
- 02:03, December 16, 2024 MST [refresh] – but, time on the Navajo Nation in Arizona
The opposite case is not supported. For places like Thule Air Base in Greenland, which observes US DST rules while WGT observes EU DST rules, a time zone properties table will be needed in Module:Time. See §Adding a new time zone.
Error messages
ပြင်ဆင်ရန်{{time}}
can produce several error messages. These are:
- {{time}} – unknown timezone – the time zone positional parameter is not one of the supported time zone abbreviations. To resolve this error check the parameter's spelling or add the time zone's properties to the module. See §Adding a new time zone.
- {{time}} – error calculating dst timestamps – indicates an internal error because one or more of the following time zone properties is malformed: UTC offset, DST begin or end definition. To resolve this error make sure that the time zone's properties are correct.
- {{time}} – incomplete definition for ... – indicates an internal error because one or more of the following time zone properties is missing: DST begin or end definition, DST event time, time zone article. To resolve this error supply the missing properties.
အချိန်ဇုန်အသစ် ပေါင်းထည့်ခြင်း
ပြင်ဆင်ရန်{{time}}
uses Module:Time. In that module, is a table of tables, the data structure that specifies the properties of the individual time zones. A blank time zone properties table has this form:
[''] = { abbr = '', dst_abbr = '', utc_offset = '', df = '', dst_begins = '', dst_ends = '', dst_time = '', dst_e_time = '', article = '' },
To add a new time zone to Module:Time, add the appropriate information inside the single quotes. If a property does not apply, leave the quotes empty. The rules for each property are:
['']
– (required) the abbreviation of a time zone's standard time; must be lower case; this is the value that will be used in the template's time zone pararameterabbr = ''
– (required) the abbreviation of a time zone's standard time as it will be rendered by the templatedst_abbr = ''
– the abbreviation of a time zone's daylight saving or summer time as it will be rendered by the templateutc_offset = ''
– (required) the offset in hours and minutes from UTC±00:00; has the form:utc_offset = '<sign>hh:mm'
where<sign>
may be+
(optional) or-
(required for time zones west of the 0 meridian)df = ''
– one of three keywordsdmy
,mdy
, oriso
used to specify date format typically used in the time zone; can be overridden with|df=
template parameterdst_begins = ''
– a four word sentence in the form<ordinal>
<day name>
<in|of>
<month name>
where:<ordinal>
– any of the words 'first', '1st', 'second', '2nd', ... 'fifth', '5th', or 'last'<day name>
– any of the day names 'Sunday', 'Monday', 'Tuesday', etc.; capitalization is not important but otherwise must be spelled correctly; abbreviations not supported<in|of>
– either of the words 'in' or 'of'<month name>
– any of the month names 'January', 'February', 'March', etc.; capitalization is not important but otherwise must be spelled correctly; abbreviations not supported
dst_ends = ''
– (required ifdst_begins
is specified) same asdst_begins
dst_time = ''
– (required ifdst_begins
is specified) the time that daylight saving time begins; usually local time; when DST begins at a specified time UTC (European Summer Time for example) use:dst_time = 'hh:mm UTC'
; four digits and the colon are requireddst_e_time = ''
– the time that daylight saving time ends if different from the time it begins; usually local daylight saving time ; when DST ends at a specified time UTC use:dst_e_time = 'hh:mm UTC'
; four digits and the colon are requiredarticle = ''
– (required) the title of a Wikipedia article that is appropriate to the timezone; do not include wikimarkup
The table-of-tables is organized east (plus UTC offsets) then west (minus UTC offset), by offset hours, and then alphabetically by time zone positional parameter name.
ကိုးကား
ပြင်ဆင်ရန်- ↑ World Time Zone Map (February 2016)။