Template:Age in years, months and days/display: Difference between revisions

From JJSWiki
Jump to navigation Jump to search
(Created page with "{{#ifexpr:{{{years|0}}}<0|{{error|Error: Invalid time. }}|}}{{#switch:{{{years|0}}} | 0 = | 1 = 1 year | #default = {{{years}}} years }}{{#ifeq:{{{year...")
 
m (3 revisions imported)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifexpr:{{{years|0}}}<0|{{error|Error: Invalid time. }}|}}{{#switch:{{{years|0}}}
{{#ifexpr:{{{years|0}}}<0|{{error|Error: Invalid time. }}|}}{{#switch:{{{years|0}}}
| 0        =
| 1        = 1 Year,&nbsp;
| 1        = 1&nbsp;year
| #default = {{{years}}} Years,&nbsp;
| #default = {{{years}}}&nbsp;years
}}{{#switch:{{{months|0}}}
}}{{#ifeq:{{{years|0}}}|0|<!--null-->|{{#ifeq:{{{months|0}}}|0|<!--null-->|{{#ifeq:{{{days|0}}}|0|&#32;and&#32;|,&#32;}} }} }}{{#switch:{{{months|0}}}
| 1        = 1 Month,&nbsp;
| 0        =
| #default = {{{months}}} Months,&nbsp;
| 1        = 1&nbsp;month
}}{{#switch:{{{days|0}}}
| #default = {{{months}}}&nbsp;months
| 1        = 1 Day
}}{{#ifeq:{{{years|0}}}|0|{{#ifeq:{{{months|0}}}|0|<!--null-->|{{#ifeq:{{{days|0}}}|0|<!--null-->|&#32;and&#32;}} }}|{{#ifeq:{{{days|0}}}|0|<!--null-->|{{#if:{{{sc|}}}|{{#ifeq:{{{months|0}}}|0|<!--null-->|,}}|<!--null-->}}&#32;and&#32;}} }}{{#switch:{{{days|0}}}
| #default = {{{days}}} Days
| 0        = {{#ifeq:{{{years|0}}}|0|{{#ifeq:{{{months|0}}}|0|no days at all}} }}
| 1        = 1&nbsp;day
| #default = {{{days}}}&nbsp;days
}}<noinclude>{{Documentation|Template:Age in years, months and days/doc}}</noinclude>
}}<noinclude>{{Documentation|Template:Age in years, months and days/doc}}</noinclude>

Latest revision as of 21:46, 16 April 2023

{{{years}}} Years, {{{months}}} Months, {{{days}}} DaysTemplate:Documentation