Template:Systime: Difference between revisions
Implement TemplateData.
Fireheart& (talk | contribs) (Created page with "<includeonly><span title="{{#invoke: Systime | toTimestamp | year = {{{1|}}} | month = {{{2|}}} | day = {{{3|}}} | hour = {{{4|}}} | min = {{{5|}}} | sec = {{{6|}}} }}" style="text-decoration: underline; text-decoration-style: dotted;">{{#invoke: Systime | toSystime | year = {{{1|}}} | month = {{{2|}}} | day = {{{3|}}} | hour = {{{4|}}} | min = {{{5|}}} | sec = {{{6|}}} }}</span></includeonly> <noinclude> Renders a Systime timestamp with hovertext displaying the calenda...") |
Fireheart& (talk | contribs) (Implement TemplateData.) |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><span title="{{#invoke: Systime | toTimestamp | year = {{{1|}}} | month = {{{2|}}} | day = {{{3|}}} | hour = {{{4|}}} | min = {{{5|}}} | sec = {{{6|}}} }}" style="text-decoration: underline; text-decoration-style: dotted;">{{#invoke: Systime | toSystime | year = {{{1|}}} | month = {{{2|}}} | day = {{{3|}}} | hour = {{{4|}}} | min = {{{5|}}} | sec = {{{6|}}} }}</span></includeonly> | <includeonly><onlyinclude><span title="{{#invoke: Systime | toTimestamp | year = {{{1|}}} | month = {{{2|}}} | day = {{{3|}}} | hour = {{{4|}}} | min = {{{5|}}} | sec = {{{6|}}} }}" style="text-decoration: underline; text-decoration-style: dotted;">{{#invoke: Systime | toSystime | year = {{{1|}}} | month = {{{2|}}} | day = {{{3|}}} | hour = {{{4|}}} | min = {{{5|}}} | sec = {{{6|}}} }}</span></onlyinclude></includeonly> | ||
Renders a Systime timestamp with hovertext displaying the calendar timestamp. | Renders a Systime timestamp with hovertext displaying the calendar timestamp. | ||
== Usage == | == Usage == | ||
The template accepts positional arguments for year, month, day, hour, minute, and second. | The template accepts positional arguments for year, month, day, hour, minute, and second. | ||
< | |||
<code><nowiki>{{ Systime | <year> | <month> | <day> | <hour> | <minute> | <second> }}</nowiki></code> | |||
* At minimum, the template must be provided with the year. | * At minimum, the template must be provided with the year. | ||
* The template requires both the month ''and'' the day to display the day of the year. | * The template requires both the month ''and'' the day to display the day of the year. | ||
| Line 12: | Line 12: | ||
=== Example === | === Example === | ||
< | <code><nowiki>{{Systime|2399|12|31|23|45}}</nowiki></code> | ||
---- | ---- | ||
{{Systime|2399|12|31|23|45}} | {{Systime|2399|12|31|23|45}} | ||
</ | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "Year", | |||
"example": "2399", | |||
"type": "number", | |||
"required": true | |||
}, | |||
"2": { | |||
"label": "Month", | |||
"example": "2", | |||
"type": "number", | |||
"suggested": true | |||
}, | |||
"3": { | |||
"label": "Day", | |||
"example": "21", | |||
"type": "number", | |||
"suggested": true | |||
}, | |||
"4": { | |||
"label": "Hour", | |||
"description": "The hour in 24-hour time.", | |||
"example": "23", | |||
"type": "number" | |||
}, | |||
"5": { | |||
"label": "Minute", | |||
"example": "55", | |||
"type": "number" | |||
}, | |||
"6": { | |||
"label": "Second", | |||
"example": "13", | |||
"type": "number" | |||
} | |||
}, | |||
"description": "Display a timestamp in Systime with a calendar tooltip.", | |||
"sets": [ {"label": "Day of Year", "params": ["2", "3"]} ] | |||
} | |||
</templatedata> | |||