The iPhone Wiki is no longer updated. Visit this article on The Apple Wiki for current information. |
Difference between revisions of "Template:Date"
(Invert the default value of the abbr= argument (requested by User:IAdam1n)) |
|||
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><!-- |
+ | <includeonly><span class="date"><!-- |
// TIME |
// TIME |
||
-->{{#if: {{{4|}}}<!-- |
-->{{#if: {{{4|}}}<!-- |
||
− | -->| {{padleft:{{{4}}}|2}}:{{padleft:{{{5|00}}|2}}<!-- |
+ | -->| {{padleft:{{{4}}}|2}}:{{padleft:{{{5|00}}}|2}}<!-- |
-->{{#if: {{{6|}}}<!-- |
-->{{#if: {{{6|}}}<!-- |
||
+ | // colon must be URL encoded to prevent MediaWiki interpreting it as a <dl> tag (indent) |
||
− | -->| :{{padleft:{{{6}}}|2}}<!-- |
||
+ | -->| :{{padleft:{{{6}}}|2}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
--> <!-- |
--> <!-- |
||
Line 16: | Line 17: | ||
-->| {{#expr: {{{3}}} }} <!-- |
-->| {{#expr: {{{3}}} }} <!-- |
||
-->}}<!-- |
-->}}<!-- |
||
+ | // Could {{#time:}} be used instead? |
||
− | -->{{#if: {{{2|}}}<!-- |
||
+ | -->{{MONTHNAME|{{{2|}}}|abbr={{{abbr|false}}}}} <!-- |
||
− | // Could {{#time:}} be used instead? |
||
− | -->| {{MONTHNAME|{{{2|}}}|abbr={{{abbr|}}}}} <!-- |
||
− | -->}}<!-- |
||
-->{{{1}}}<!-- |
-->{{{1}}}<!-- |
||
+ | // ZONE |
||
− | --></includeonly><noinclude> |
||
+ | -->{{#if: {{{z|}}}<!-- |
||
− | = DO NOT USE = |
||
+ | -->| ({{{z}}})<!-- |
||
− | This template is not complete. |
||
+ | -->}}<!-- |
||
+ | |||
+ | |||
+ | --></span></includeonly><noinclude> |
||
== Usage == |
== Usage == |
||
Full parameter list: |
Full parameter list: |
||
− | <nowiki>{{</nowiki>date|<year>|<month>|<day>|<hour>|<minute>|<second>|abbr=<abbr><nowiki>}}</nowiki> |
+ | <nowiki>{{</nowiki>date|<year>|<month>|<day>|<hour>|<minute>|<second>|z=<zone>|abbr=<abbr><nowiki>}}</nowiki> |
Parameters: |
Parameters: |
||
* '''year''' (required) |
* '''year''' (required) |
||
− | * '''month''': The month ''number'' |
+ | * '''month''': (required) The month ''number'' |
* '''day''' |
* '''day''' |
||
* '''hour''' |
* '''hour''' |
||
* '''minute''' |
* '''minute''' |
||
* '''second''' |
* '''second''' |
||
+ | * '''zone''': Currently, all this does is append "<code>(<zone>)</code>" to the date, but in [http://meta.stackexchange.com/a/19514 6 to 8 weeks], this will have the date be adjusted to the timezone specified in the user's settings |
||
− | * '''abbr''': Use "<code>true</code>" to use the abbreviated month name instead of the full length |
||
+ | * '''abbr''': Use "<code>true</code>" to use the abbreviated month name instead of the full name |
||
</noinclude> |
</noinclude> |
Latest revision as of 22:55, 5 September 2021
Usage
Full parameter list:
{{date|<year>|<month>|<day>|<hour>|<minute>|<second>|z=<zone>|abbr=<abbr>}}
Parameters:
- year (required)
- month: (required) The month number
- day
- hour
- minute
- second
- zone: Currently, all this does is append "
(<zone>)
" to the date, but in 6 to 8 weeks, this will have the date be adjusted to the timezone specified in the user's settings - abbr: Use "
true
" to use the abbreviated month name instead of the full name