Difference between revisions of "Template:Datetime/doc"

From blackwiki
Jump to navigation Jump to search
imported>BrandonXLF
imported>BrandonXLF
Line 1: Line 1:
'''This template is for showing the local time of settlements on settlement articles.''' ''Please keep it this way and don't change the use of this template.''
+
{{Documentation subpage}}
 +
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 +
{{Interwikitmp-grp|commons=DATETIME}}
  
''For a template that displays the current date in UTC as normal text without a picture see [[Template:Time]]''
+
=== Usage ===
 +
This template is intended to be used for time stamping. It provides the date in the form '''<nowiki> '{{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)' </nowiki>'''. Use is usually best preceded by ''''subst:''''.
  
{{lua|Module:time}}
+
=== See also ===
  
==Useage==
+
<includeonly>
<code><nowiki>{{timedate|time zone|dst=yes or no}}</nowiki></code>
+
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
*repalce 'time zone' with the time zone abberation [[documentation|template:time/doc#Supported_time_zones]]
+
[[Category:Time, date and calendar templates|Datetime]]
*Pick yes or no depending on if daylight saving times should apply.
 
  
==Example==
+
</includeonly>
<code><nowiki>{{timedate|EST|dst=yes}}</nowiki></code>
 
<br>
 
{{timedate|EST|dst=yes}}
 
 
 
Note: If no time zone is put and time zone is removed then will use [[UTC]] time.
 
 
 
==Adding a new time zone==
 
{{tld|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:
 
<pre>[''] = {
 
abbr = '',
 
dst_abbr = '',
 
utc_offset = '',
 
df = '',
 
dst_begins = '',
 
dst_ends = '',
 
dst_time = '',
 
dst_e_time = '',
 
article = ''
 
},</pre>
 
 
 
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:
 
:<code><nowiki>['']</nowiki></code> – (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 pararameter
 
:<code><nowiki>abbr = ''</nowiki></code> – (required) the abbreviation of a time zone's standard time as it will be rendered by the template
 
:<code><nowiki>dst_abbr = ''</nowiki></code> – the abbreviation of a time zone's daylight saving or summer time as it will be rendered by the template
 
:<code><nowiki>utc_offset = ''</nowiki></code> – (required) the offset in hours and minutes from [[UTC±00:00]]; has the form: <code><nowiki>utc_offset = '<sign>hh:mm'</nowiki></code> where <code><sign></code> may be <code>+</code> (optional) or <code>-</code> (required for time zones west of the 0 meridian)
 
:<code><nowiki>df = ''</nowiki></code> – one of three keywords <code>dmy</code>, <code>mdy</code>, or <code>iso</code> used to specify date format typically used in the time zone; can be overridden with {{para|df}} template parameter
 
:<code><nowiki>dst_begins = ''</nowiki></code> – a four word sentence in the form <code><ordinal></code> <code><day name></code> <code><in|of></code> <code><month name></code> where:
 
::<code><ordinal></code> – any of the words 'first', '1st', 'second', '2nd', ... 'fifth', '5th', or 'last'
 
::<code><day name></code> – any of the day names 'Sunday', 'Monday', 'Tuesday', etc.; capitalization is not important but otherwise must be spelled correctly; abbreviations not supported
 
::<code><in|of></code> – either of the words 'in' or 'of'
 
::<code><month name></code> – any of the month names 'January', 'February', 'March', etc.; capitalization is not important but otherwise must be spelled correctly; abbreviations not supported
 
:<code><nowiki>dst_ends = ''</nowiki></code> – (required if <code>dst_begins</code> is specified) same as <code>dst_begins</code>
 
:<code><nowiki>dst_time = ''</nowiki></code> – (required if <code>dst_begins</code> 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:  <code>dst_time = 'hh:mm UTC'</code>; four digits and the colon are required
 
:<code><nowiki>dst_e_time = ''</nowiki></code> – 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:  <code>dst_e_time = 'hh:mm UTC'</code>; four digits and the colon are required
 
:<code><nowiki>article = ''</nowiki></code> – (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.
 

Revision as of 23:03, 16 December 2017

Template:Interwikitmp-grp

Usage

This template is intended to be used for time stamping. It provides the date in the form '{{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)' . Use is usually best preceded by 'subst:'.

See also