Template:Age in years, months, weeks and days/doc

From Soyjak Wiki, The Free Soycyclopedia
Jump to navigationJump to search

Usage

{{Age in years, months, weeks and days |month1 = |day1 = |year1 = |month2 = |day2 = | year2 = }} 

Each value defaults to the current date.

Example

When both dates are set:

{{Age in years, months, weeks and days |month1 = 4 |day1 = 20 |year1 = 1889 |month2 = 4 |day2 = 30 |year2 = 1945 }} -> 56 years, 1 week and 3 days

When there is no end date:

{{Age in years, months, weeks and days |month1 = 9 |day1 = 19 |year1 = 2020 }} -> 3 years, 7 months, 1 week and 1 day

When there is no start date (ie: Days until a future event)

{{Age in years, months, weeks and days |month2 = 9 |day2 = 19 |year2 = 2024 }} → 4 months, 3 weeks and 2 days