Templat:Age in years, months, weeks and days: Perbezaan antara semakan

tiada ringkasan suntingan
(Mencipta laman baru dengan kandungan '{{Age in years, months, weeks and days/display |years={{#expr: {{{year2 | {{CURRENTYEAR}} }}} - {{{year1 | {{CURRENTYEAR}} }}} - {{#ifexpr: {{{month2 | {{C...')
 
Tiada ringkasan suntingan
Teg-teg: Suntingan mudah alih Suntingan web mudah alih Advanced mobile edit
{{Age in years, months, weeks and days/display
|years={{#expr: {{{year2 | {{CURRENTYEAR}} }}} - {{{year1 | {{CURRENTYEAR}} }}} - {{#ifexpr: {{{month2 | {{CURRENTMONTH}} }}} >{{{month1 | {{CURRENTMONTH}} }}}
|0
|{{#ifexpr: {{{month2 | {{CURRENTMONTH}} }}} < {{{month1 | {{CURRENTMONTH}} }}}
|1
|{{#ifexpr: {{{day2 | {{CURRENTDAY}} }}} >= {{{day1 | {{CURRENTDAY}} }}}
|0
|1
}}
}}}}
|months={{#expr: {{{month2 | {{CURRENTMONTH}} }}} - {{{month1 | {{CURRENTMONTH}} }}} + {{#ifexpr: {{{day2 | {{CURRENTDAY}} }}} >={{{day1 | {{CURRENTDAY}} }}}
|{{#ifexpr: {{{month2 | {{CURRENTMONTH}} }}} >= {{{month1 | {{CURRENTMONTH}} }}}
|0
|12
}}
|{{#ifexpr: {{{month2 | {{CURRENTMONTH}} }}} > {{{month1 | {{CURRENTMONTH}} }}}
|-1
|11
}}
}}}}
|weeks={{#ifexpr: ({{{day2 | {{CURRENTDAY}} }}} < {{{day1 | {{CURRENTDAY}} }}})
|{{#expr: {{age in weeks
|day1 = {{{day1 | {{CURRENTDAY}} }}}
|month1 = (({{{month2 | {{CURRENTMONTH}} }}} + 10) mod 12) + 1
|year1 = {{{year2 | {{CURRENTYEAR}} }}} - ({{{month2 | {{CURRENTMONTH}} }}} = 1)
|day2 = {{{day2 | {{CURRENTDAY}} }}}
|month2 = {{{month2 | {{CURRENTMONTH}} }}}
|year2 = {{{year2 | {{CURRENTYEAR}} }}}
 
}} }}
|{{#expr: {{age in weeks
|day1 = {{{day1 | {{CURRENTDAY}} }}}
|month1 = {{{month2 | {{CURRENTMONTH}} }}}
|year1 = {{{year2 | {{CURRENTYEAR}} }}}
|day2 = {{{day2 | {{CURRENTDAY}} }}}
|month2 = {{{month2 | {{CURRENTMONTH}} }}}
|year2 = {{{year2 | {{CURRENTYEAR}} }}}
}} }} }}
 
|days={{#expr: ({{{day2 | {{CURRENTDAY}} }}} - {{{day1 | {{CURRENTDAY}} }}} + {{#ifexpr: {{{day2 | {{CURRENTDAY}} }}} >= {{{day1 |{{CURRENTDAY}} }}}
|0
|{{#switch: {{{month2 | {{CURRENTMONTH}} }}}
|5|7|10|12 = 30
|1|2|4|6|8|9|11 = 31
|3={{#ifexpr: {{{year2 | {{CURRENTYEAR}} }}} mod 4 = 0
|{{#ifexpr: ({{{year2 | {{CURRENTYEAR}} }}} mod 100 = 0) and ({{{year2 | {{CURRENTYEAR}} }}} mod 400 != 0)
|28
|29
4,681

suntingan