Template:Age calculator: Difference between revisions

From OLPC
Jump to navigation Jump to search
(see also)
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
{| cellspacing="0" style="width: 238px; background: #99CCFF;"
{| cellspacing="0" style="width: 238px; background: #99CCFF;"
| style="width: 45px; height: 43px; background: #003388; text-align: center; font-size:15pt; color: #fff;" | '''{{#ifexpr: {{{month|{{CURRENTMONTH}}}}} < {{CURRENTMONTH}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#ifexpr: {{{month|{{CURRENTMONTH}}}}} = {{CURRENTMONTH}} | {{#ifexpr: {{{day|{{CURRENTDAY}}}}} <= {{CURRENTDAY}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} - 1 }} }} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} - 1 }} }} }}'''
| style="width: 45px; height: 43px; background: #003388; text-align: center; font-size:15pt; color: #fff;" | '''{{#ifexpr: {{{month|{{CURRENTMONTH}}}}} < {{CURRENTMONTH}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#ifexpr: {{{month|{{CURRENTMONTH}}}}} = {{CURRENTMONTH}} | {{#ifexpr: {{{day|{{CURRENTDAY}}}}} <= {{CURRENTDAY}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} - 1 }} }} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} - 1 }} }} }}'''
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em; color: #000;" | This [[OLPC:OLPCan|OLPCan]] is <!--
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em; color: #000;" | This [[OLPC:OLPCers|OLPCer]] is <!--


//-->{{#ifexpr: {{{month|{{CURRENTMONTH}}}}} < {{CURRENTMONTH}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#ifexpr: {{{month|{{CURRENTMONTH}}}}} = {{CURRENTMONTH}} | {{#ifexpr: {{{day|{{CURRENTDAY}}}}} <= {{CURRENTDAY}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#expr: ({{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}}) - 1 }} }} | {{#expr: ({{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}}) - 1 }} }} }} years{{#ifexpr:{{#ifeq:{{CURRENTMONTH}}|{{{month}}}|1|0}} AND {{#ifeq:{{CURRENTDAY}}|{{{day}}}|1|0}}|&nbsp;old today! |, <!--
//-->{{#ifexpr: {{{month|{{CURRENTMONTH}}}}} < {{CURRENTMONTH}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#ifexpr: {{{month|{{CURRENTMONTH}}}}} = {{CURRENTMONTH}} | {{#ifexpr: {{{day|{{CURRENTDAY}}}}} <= {{CURRENTDAY}} | {{#expr: {{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}} }} | {{#expr: ({{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}}) - 1 }} }} | {{#expr: ({{CURRENTYEAR}} - {{{year|{{CURRENTYEAR}}}}}) - 1 }} }} }} years{{#ifexpr:{{#ifeq:{{CURRENTMONTH}}|{{{month}}}|1|0}} AND {{#ifeq:{{CURRENTDAY}}|{{{day}}}|1|0}}|&nbsp;old today! |, <!--
Line 13: Line 13:
|}</div><!--
|}</div><!--
--><noinclude>
--><noinclude>

<br/><br/><br/>


see [[Template:Days in month]]
see [[Template:Days in month]]
:{{days in month}}


==Usage==
==Usage==
<nowiki>{{Age-calculator|day=16|month=08|year=1952}}</nowiki><br>
<nowiki>{{Age-calculator|day=16|month=08|year=1952}}</nowiki><br>
{{Age-calculator|day=16|month=08|year=1952}}
{{Age-calculator|day=16|month=08|year=1934}}
[[Category:demonstration templates]]
[[Category:demonstration templates]]
</noinclude>
</noinclude>

Latest revision as of 03:12, 10 February 2008

0 This OLPCer is 0 years, 0 months, and 0 days old
on November 22, 2024.




see Template:Days in month

30

Usage

{{Age-calculator|day=16|month=08|year=1952}}

90 This OLPCer is 90 years, 3 months, and 6 days old
on November 22, 2024.