ढाँचा:Time/कागजात
यो ढाँचाले लुआ प्रयोग गर्दछ: |
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.
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.
Usage
[सम्पादन गर्नुहोस्]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}}
Supported time zones
[सम्पादन गर्नुहोस्]This is a list of the currently supported time zone abbreviations:
- ACST (ACDT)
- AEST (AEDT)
- AKST (AKT)
- AoE[upper-alpha १]
- AST (AT) (ADT)
- AWST
- BST
- BT
- CET (CEST)
- ChST
- CST (CT) (CDT)
- EET (EEST)
- EST (ET) (EDT)
- GMT
- GMT-IE[upper-alpha २]
- GMT-UK[upper-alpha ३]
- HAST (HADT) (HST) (HDT)
- IDLE[upper-alpha १]
- IDLW[upper-alpha १]
- IRKT
- IST
- JST
- KRAT
- MSK
- MST
- NST
- NZST (NZDT)
- OMST
- PETT
- PKT
- PMST[upper-alpha ४]
- PST (PT) (PDT)
- SAMT
- SAST
- SRET
- SST
- USZ1
- UTC
- VLAT
- WET (WEST)
- 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. The United Kingdom observes GMT in winter but shifts to British Summer Time in summer. The abbreviation BST is also used by Bangladesh Standard Time. To differentiate GMT as observed in the UK from year-round GMT, use GMT-UK for the former.
- ↑ 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}}
- ०१:१९, नोभेम्बर २०, २०२४ MST [refresh] – time in Arizona
{{time|MST}}
- ०१:१९, नोभेम्बर २०, २०२४ 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}} – both of |df-cust-a= and |df-cust-p required – when defining a custom format for am (or pm) time, you must also define a custom format for pm (or am) time
- {{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}} – invalid date format <format> – value assigned to
|df=
is not one of the defined format strings; ss §Parameters - {{time}} – invalid use of ± - the symbol ± is being used when the minute and hour offsets aren't 00:00
- {{time}} – malformed or incomplete _TEST_TIME_ – value assigned to this parameter must either have the format: YYYY-MM-DDThh:mm:ss where all except 'T' are digits, or YYYYMMDDhhmmss
- {{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.
Adding a new time zone
[सम्पादन गर्नुहोस्]{{time}}
uses Module:Time/data. 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/data, 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 parameterabbr = ''
– (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.
Adding a new alias
[सम्पादन गर्नुहोस्]You may also want to add an alias of a timezone:
[''] = {tz = ''},
To add a new time zone to Module:Time/data, add the appropriate information inside the single quotes.
['']
– (required) the abbreviation of a time zone's alias. This must be lower case.tz = ''
– (required) the abbreviation of the time zone that's already in the code. This must be lower case
The table-of-tables is organized east (plus UTC offsets) then west (minus UTC offset), and by if it's a DST offset or if it's not.
See also
[सम्पादन गर्नुहोस्]
This template does not put a working clock on your page. The clock will not update the time on your screen every minute. Instead, it records the date and time that the page was most recently edited or purged. If you want a clock that constantly updates, then go to Special:Preferences#mw-prefsection-gadgets and enable the Appearance item, "Add a clock to the personal toolbar that displays the current time in UTC and provides a link to purge the current page". |
Multiple units of time
[सम्पादन गर्नुहोस्]Type | Adjustable | Current | Last | Next |
---|---|---|---|---|
Date and Time | {{time}} | {{Currentdate}} (MDY) {{Plain now}} (DMY) {{Now}} (DMY in a complete sentence) {{Simple now}} |
||
Date Only | {{Dateonly}} {{Datedow}} (Has the day of the week) |
{{Date}} (Chose format) {{DATE}} (prefixed by date=) {{TODAY}} (DMY) |
{{Yesterday}} {{Day-1}} |
{{Tomorrow}} {{Day+1}} |
Time only | {{Timeonly}} | {{CURRENTTIME}} (12 h format) {{CURRENTTIME24}} (24 h format) |
||
Banners | {{Right now}} (Blue with time and number of Wikipedia articles) {{Right now (User message)}} (Orange with time and number of Wikipedia articles |
|||
Timestamp | {{Timestamp}} (Format YYYYMMDDhhmmss) |
Single units of time
[सम्पादन गर्नुहोस्]Unit of time | Adjustable | Current | Last | Next |
---|---|---|---|---|
SECOND | {{CURRENTSECOND}} | |||
MINUTE | {{CURRENTMINUTE}} | |||
HOUR | {{Currenthour}} | {{Hour-1}} | {{Hour+1}} | |
WEEK | {{CURRENTWEEKOFYEAR}} {{CURRENTWEEKOFMONTH}} |
|||
Day of Week | {{Dow}} | {{CURRENTWEEKDAYNAME}} {{CURRENTWEEKDAYABBREV}} {{CURRENTWEEKDAY}} |
{{LASTWEEKDAYNAME}} {{LASTWEEKDAYABBREV}} |
{{NEXTWEEKDAYNAME}} {{NEXTWEEKDAYABBREV}} |
MONTH | {{MONTHNAME}} {{MONTHABBREV}} {{MONTHNUMBER}} {{MONTH}} (zero padded) |
{{Currentmonth}} {{CURRENTMONTHABBREV}} {{CURRENTMONTHNUMBER}} {{CURRENTMONTHDAYS}} |
{{LASTMONTH}} (Can make not zero-padded) {{LASTMONTHNAME}} {{LASTMONTHABBR}} |
{{NEXTMONTH}} (Can make not zero-padded) {{NEXTMONTHNAME}} {{NEXTMONTHABBR}} |
Day of Month | {{Currentday}} | |||
YEAR | {{CURRENTYEARCC}} {{CURRENTYEARYY}} {{CURRENTISOYEAR}} {{CURRENTYEAR}} |
{{LASTYEAR}} | {{NEXTYEAR}} | |
Day of Year | {{CURRENTDAYOFYEAR}} | |||
DECADE | {{DECADE}} | {{CURRENTDECADE}} | {{LASTDECADE}} | {{NEXTDECADE}} |
CENTURY | {{CENTURY}} | {{CURRENTCENTURY}} | {{LASTCENTURY}} | {{NEXTCENTURY}} |
MILLENNIUM | {{MILLENNIUM}} | {{Currentmillennium}} |
Date and time Templates made for substitution:
[सम्पादन गर्नुहोस्]Month:
{{Lmonth}} produces ढाँचा:Lmonth
{{Nmonth}} produces ढाँचा:Nmonth
{{LastMonth}} produces ढाँचा:LastMonth
{{NextMonth}} produces ढाँचा:NextMonth
Individual Templates
[सम्पादन गर्नुहोस्]- {{Calendar}}
- {{Calendar clock with Wikipedia stats}}
- {{Clock}}
- {{Digital clock}}
- {{Digital clock and date}}
Categories of Templates
[सम्पादन गर्नुहोस्]- Category:Time, date and calendar templates
- Category:Date-computing templates
- Category:Date-computing templates based on current time
- Category:ISO date templates
- Category:Calendar templates
- Category:Clock templates
References
[सम्पादन गर्नुहोस्]- ↑ "World Time Zone Map", HM Nautical Almanac Office, फेब्रुअरी २०१६।
TemplateData
[सम्पादन गर्नुहोस्]Timeको कागजात
कुनै विवरण छैन।
मापदण्ड | विवरण | प्रकार | स्थिति | |
---|---|---|---|---|
time zone | 1 | The time zone for the time formatting
| String | सुझावित |
date format | 2 df | The format to render the date and time
| अज्ञात | सुझावित |
Daylight savings time | dst | कुनैपनि विवरण छैन
| String | वैकल्पिक |
ISO 639 language code | lang | displays time/date in language specified by ISO 639 language | String | वैकल्पिक |
dateonly | dateonly | If 'yes', suppresses display of the time and only shows the date
| String | वैकल्पिक |
timeonly | timeonly | If 'yes', suppresses display of the date and only shows the time
| String | वैकल्पिक |
Hide time zone? | hide-tz | If 'yes', suppresses time zone abbreviation
| String | वैकल्पिक |
Don't link time zone? | unlink-tz | If 'yes', renders the timezone without linking to its article.
| String | वैकल्पिक |