Difference between revisions of "Template:Countdown to anniversary/doc"
imported>Renamed user awfwvowjvwrvnwio m (→Examples: minor typo) |
imported>Renamed user awfwvowjvwrvnwio (Use generic values) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 20: | Line 20: | ||
== Examples == | == Examples == | ||
| − | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>| | + | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>|1980|6|15|It's my birthday!}}</nowiki></code> gives: |
| − | {{Countdown to anniversary| | + | {{Countdown to anniversary|1980|6|15|It's my birthday!}} |
| − | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>| | + | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>|1980|6|15|It's my birthday!|12|30|0}}</nowiki></code> gives: |
| − | {{Countdown to anniversary| | + | {{Countdown to anniversary|1980|6|15|It's my birthday!|12|30|0}} |
| − | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>| | + | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>|1982|11|24|It's my best friend's birthday!|4|22|0}}</nowiki></code> gives: |
| − | {{Countdown to anniversary| | + | {{Countdown to anniversary|1982|11|24|It's my best friend's birthday!|4|22|0}} |
| − | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>| | + | <code><nowiki>{{</nowiki>[[Template:Countdown to anniversary|Countdown to anniversary]]<nowiki>|1980|2|29|The next 29th of February is 1461 days away.|12|0|0}}</nowiki></code> gives (example of leapling): |
| − | {{Countdown to anniversary| | + | {{Countdown to anniversary|1980|2|29|The next 29th of February is 1461 days away.|12|0|0}} |
| + | == TemplateData == | ||
| + | {{TemplateData header}} | ||
<templatedata> | <templatedata> | ||
{ | { | ||
| Line 41: | Line 43: | ||
"1": { | "1": { | ||
"description": "Target date's year", | "description": "Target date's year", | ||
| − | "example": " | + | "example": "1980", |
"type": "number", | "type": "number", | ||
| − | "default": " | + | "default": "1980", |
"suggested": true | "suggested": true | ||
}, | }, | ||
| Line 62: | Line 64: | ||
], | ], | ||
"description": "Target date's month", | "description": "Target date's month", | ||
| − | "example": " | + | "example": "6", |
"type": "number", | "type": "number", | ||
| − | "default": " | + | "default": "6", |
"suggested": true | "suggested": true | ||
}, | }, | ||
| Line 102: | Line 104: | ||
], | ], | ||
"description": "Target date's day of month", | "description": "Target date's day of month", | ||
| − | "example": " | + | "example": "15", |
"type": "number", | "type": "number", | ||
| − | "default": " | + | "default": "15", |
"suggested": true | "suggested": true | ||
}, | }, | ||
| Line 141: | Line 143: | ||
], | ], | ||
"description": "When not in a birthday, the hour (from 0 to 23) of the date-time to count down to.", | "description": "When not in a birthday, the hour (from 0 to 23) of the date-time to count down to.", | ||
| − | "example": " | + | "example": "12", |
"type": "number", | "type": "number", | ||
"default": "0" | "default": "0" | ||
| Line 209: | Line 211: | ||
], | ], | ||
"description": "When not in a birthday, the minute (from 0 to 59) of the date-time to count down to.", | "description": "When not in a birthday, the minute (from 0 to 59) of the date-time to count down to.", | ||
| − | "example": " | + | "example": "30", |
"type": "number", | "type": "number", | ||
"default": "0" | "default": "0" | ||
Latest revision as of 21:22, 28 March 2018
| 40px | This is a documentation subpage for Template:Countdown to anniversary. It contains usage information, categories and other content that is not part of the original template page. |
| 40x40px | This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
| 40x40px | This template should not be substituted. |
Usage
Usage: {{Countdown to anniversary|year|month|day|msg|hour|minute|second}},
where year, month and day represent the target date and hour, minute and second specify the respective components of the date-time to count down to.
hour, minute and second are not required.
Examples
{{Countdown to anniversary|1980|6|15|It's my birthday!}} gives:
Error: year, month, and day must be specified
{{Countdown to anniversary|1980|6|15|It's my birthday!|12|30|0}} gives:
Error: year, month, and day must be specified
{{Countdown to anniversary|1982|11|24|It's my best friend's birthday!|4|22|0}} gives:
Error: year, month, and day must be specified
{{Countdown to anniversary|1980|2|29|The next 29th of February is 1461 days away.|12|0|0}} gives (example of leapling):
Error: year, month, and day must be specified
TemplateData
TemplateData for Countdown to anniversary
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| 1 | 1 | Target date's year
| Number | suggested |
| 2 | 2 1 2 3 4 5 6 7 8 9 10 11 12 | Target date's month
| Number | suggested |
| 3 | 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | Target date's day of month
| Number | suggested |
| 4 | 4 | Message to show during the anniversary.
| String | optional |
| 5 | 5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | When not in a birthday, the hour (from 0 to 23) of the date-time to count down to.
| Number | optional |
| 6 | 6 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | When not in a birthday, the minute (from 0 to 59) of the date-time to count down to.
| Number | optional |
| 7 | 7 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | When not in a birthday, the second (from 0 to 59) of the date-time to count down to.
| Unknown | optional |