Template:Checked time unit: Difference between revisions
From Guild of Archivists
(Create 'Checked time unit' template. This template is intended as a backend for other templates implementing range-checked time units.) |
(Add 'includeonly' and 'noinclude' tags with 'Documentation' template.) |
||
Line 1: | Line 1: | ||
{{#if: {{{1|{{{ordinal|}}}}}} || {{error|Parameters 1 or ordinal must be provided with a valid argument.}}}}<!-- | <includeonly>{{#if: {{{1|{{{ordinal|}}}}}} || {{error|Parameters 1 or ordinal must be provided with a valid argument.}}}}<!-- | ||
-->{{#if: {{{1|{{{ordinal|}}}}}} || {{#if: {{{2|{{{minimum|}}}}}} || }}}}<!-- | -->{{#if: {{{1|{{{ordinal|}}}}}} || {{#if: {{{2|{{{minimum|}}}}}} || }}}}<!-- | ||
-->{{#if: {{{2|{{{minimum|}}}}}} || {{error|Parameters 2 or minimum must be provided with a valid argument.}}}}<!-- | -->{{#if: {{{2|{{{minimum|}}}}}} || {{error|Parameters 2 or minimum must be provided with a valid argument.}}}}<!-- | ||
Line 13: | Line 13: | ||
}} | }} | ||
}} | }} | ||
}} | }}</includeonly> | ||
<noinclude>{{Documentation}}</noinclude> |
Revision as of 07:43, 29 November 2024
A template that produces an error message if a value is beyond a specified range. It is intended to be used for implementing various range-checked time unit templates, and its error messages reflect this through the use of 'ordinal' as a named parameter in the error messages.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Ordinal | 1 ordinal | The value to be kept in range. | Number | required |
Minimum | 2 minimum | The minimum of the inclusive range. | Number | required |
Maximum | 3 maximum | The maximum of the inclusive range. | Number | required |
The above documentation is transcluded from Template:Checked time unit/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |