टेम्पलेट:Age in years, months and days/display: रिवीजन सभ के बीचा में अंतर
Content deleted Content added
छो Changed protection level of Template:For year month day/display: allow template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) |
placing an error notice when dates are backwards, and making the serial comma an opt in |
||
लाइन 1:
{{#ifexpr:{{{years|0}}}<0|{{error|Error: Invalid time. }}|}}{{#switch:{{{years|0}}}
| 0 =
| 1 = 1 year
लाइन 7:
| 1 = 1 month
| #default = {{{months}}} months
}}{{#ifeq:{{{years|0}}}|0|{{#ifeq:{{{months|0}}}|0|<!--null-->|{{#ifeq:{{{days|0}}}|0|<!--null-->| and }} }}|{{#ifeq:{{{days|0}}}|0|<!--null-->|{{#if:{{{sc|}}}|{{#ifeq:{{{months|0}}}|0|<!--null-->|,}}|<!--null-->}} and }} }}{{#switch:{{{days|0}}}
| 0 = {{#ifeq:{{{years|0}}}|0|{{#ifeq:{{{months|0}}}|0|no days at all}} }}
| 1 = 1 day
|