Template:Datetime/doc
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.
For a template that displays the current date in UTC as normal text without a picture see Template:Time
| File:Lua-Logo.svg | This template uses Lua: |
Useage
{{timedate|time zone|dst=yes or no}}
- repalce 'time zone' with the time zone abberation template:time/doc#Supported_time_zones
- Pick yes or no depending on if daylight saving times should apply.
Example
{{timedate|EST|dst=yes}}
Template:Timedate
Note: If no time zone is put and time zone is removed then will use UTC time.
Adding a new time zone
{{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, orisoused 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_beginsis specified) same asdst_beginsdst_time = ''– (required ifdst_beginsis 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.