Template:Time: Difference between revisions

From Mechabellum Wiki
(Created page with "{{#if: {{{1|}}} | <time datetime="{{{1}}}Z" {{#if:{{{repeat|}}} | data-interval="{{{repeat}}}" }} {{#if:{{{type|}}} | data-type="{{{type}}}" }} >{{{1}}}</time> | Invalid Date }} <noinclude> <templatedata> { "params": { "1": { "aliases": [ "date" ], "label": "Date", "description": "Full date and time", "example": "2023-12-31 23:59", "type": "line", "required": true }, "repeat": { "label": "Interval", "description": "Repeat every x day...")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if: {{{1|}}} | <time datetime="{{{1}}}Z"
{{#if: {{{1|}}} | <time datetime="{{{1}}}Z"
{{#if:{{{repeat|}}} | data-interval="{{{repeat}}}" }}
{{#if:{{{repeat|}}} | data-interval="{{{repeat}}}" }}
{{#if:{{{type|}}} | data-type="{{{type}}}" }}
{{#if:{{{show|}}} | data-type="{{{show}}}" }}
>{{{1}}}</time> | Invalid Date }}
>{{{1}}} UTC</time> | Invalid Date }}
<noinclude>
<noinclude>
<templatedata>
<templatedata>
Line 12: Line 12:
],
],
"label": "Date",
"label": "Date",
"description": "Full date and time",
"description": "Full date and time in UTC",
"example": "2023-12-31 23:59",
"example": "2023-12-31 23:59",
"type": "line",
"type": "line",
Line 21: Line 21:
"description": "Repeat every x days"
"description": "Repeat every x days"
},
},
"type": {
"show": {
"label": "Type",
"label": "Show",
"description": "Set display type. \"full\" and \"short\" show date and time, \"time\" shows only time, \"weekday\" shows time with weekday. If empty defaults to short.",
"description": "Set display type. \"full\" and \"short\" show date and time, \"time\" shows only time, \"weekday\" shows time with weekday. If empty defaults to short.",
"suggestedvalues": [
"suggestedvalues": [
Line 33: Line 33:
}
}
},
},
"description": "Displays date and time in local and UTC time"
"description": "Displays date and time in local and UTC time",
"paramOrder": [
"1",
"repeat",
"show"
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 21:01, 19 June 2023

Invalid Date

Displays date and time in local and UTC time

Template parameters

ParameterDescriptionTypeStatus
Date1 date

Full date and time in UTC

Example
2023-12-31 23:59
Linerequired
Intervalrepeat

Repeat every x days

Unknownoptional
Showshow

Set display type. "full" and "short" show date and time, "time" shows only time, "weekday" shows time with weekday. If empty defaults to short.

Suggested values
full short time weekday
Default
short
Unknownoptional