FANDOM



Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [purge/refresh]

This template returns the number of Years, Months, Weeks and Days that have elapsed between two dates.

See Age calculation templates wp for more information on using this kind of template.

Usage

{{AgeYMWD|month1=|day1=|year1=|month2=|day2=|year2= }}

Note that all parameters default to the current date, so for example, the second set of parameters can be left out to calculate elapsed time since a past date:

  • {{AgeYMWD|month1=1|day1=1|year1=1}} produces 2019 years, 6 months, 1 week and 4 days

Or simply, using the simpler parameter names, compatible with {{AgeYMWD}}:

  • {{AgeYMWD|month=1|day=1|year=1}} produces 2019 years, 6 months, 1 week and 4 days

Alternatively, the first set of parameters can be left out to get the time left until a future date, such as the next Century:

  • {{AgeYMWD|month2=1|day2=1|year2=2100}} produces 79 years, 5 months, 2 weeks and 6 days

The above text is transcluded from Template:AgeYMWD/doc.
You can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's Sandbox (create | Mirror ) and Testcases (create) pages.
Please add categories and interwikis to Template:AgeYMWD/doc. (View all subpages of this page.)
Community content is available under CC-BY-SA unless otherwise noted.