Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
NowMusic Wiki
Search
Search
Appearance
Donate
Create account
Log in
Personal tools
Donate
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Age in days/doc
(section)
Template
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Usage== ====Full dates==== To use, type: :{| |- |<code><nowiki>{{age in days|date1|date2}}</nowiki></code> ||(number of days between dates 1 and 2), |- |<code><nowiki>{{age in days|date1}}</nowiki></code> ||(number of days since date 1) or |- |<code><nowiki>{{age in days||date2}}</nowiki></code> ||(number of days until date 2) |} Examples: :{| |- |<code><nowiki>{{age in days|19 Aug 2008|4 Sep 2010}}</nowiki></code> ||gives {{age in days|19 Aug 2008|4 Sep 2010}} |- |<code><nowiki>{{age in days|27 May 2002}}</nowiki></code> ||gives {{age in days|27 May 2002}} |- |<code><nowiki>{{age in days||{{#time:j M Y|+ 15 months}}}}</nowiki></code> ||gives {{age in days||{{#time:j M Y|+ 15 months}}}} |} ====Year, month and day==== To use, type: :{| |- |<code><nowiki>{{age in days|year1|month1|day1|year2|month2|day2}}</nowiki></code> ||(number of days between dates 1 and 2), |- |<code><nowiki>{{age in days|year1|month1|day1}}</nowiki></code> ||(number of days since date 1) or |- |<code><nowiki>{{age in days||||year2|month2|day2}}</nowiki></code> ||(number of day until date 2) |} Or with named parameters: :{| |- |<code><nowiki>{{age in days|month1= |day1= |year1= |month2= |day2= | year2= }}</nowiki></code> ||(number of days between dates 1 and 2), |- |<code><nowiki>{{age in days|month1= |day1= |year1= }}</nowiki></code> ||(number of days since date 1) or |- |<code><nowiki>{{age in days|month2= |day2= | year2= }}</nowiki></code> ||(number of day until date 2) |} Examples: {| |- |<code><nowiki>{{age in days|2007|5|24|2008|4|23}}</nowiki></code> ||gives {{age in days|2007|5|24|2008|4|23}} |- |<code><nowiki>{{age in days|2007|5|24}}</nowiki></code> ||gives {{age in days|2007|5|24}} |} ===Sorting=== By adding {{para|sortable|on}} a sort key will be added to the output for use in sortable tables. ===Formatting=== Three styles of formatting are possible. :{| |- |{{para|format|raw}} ||gives unformatted numbers with hyphens as minus signs<ref>Negative days will occur if the first date is after the second.</ref> (for use in further calculations). |- |{{para|format|commas}} ||gives numbers formatted with commas and true minus signs. |} For reasons of retrospective compatibility, the default when inputting dates as year, month and day is {{para|format|raw}}; however when inputting dates in full it is {{para|format|commas}}. :Note {{Reflist}} ===Showing the unit=== The default is not to show units. To show the unit ("day", days" or "d") use {{para|show unit}}. :{| |- |{{para|show unit|abbr}} ||adds "d" after the number of days. |- |{{para|show unit|full}} ||adds "day" or "days" after the number of days as appropriate. |} <!--==See also== * [[Wikipedia:Age calculation templates]] * {{tl|Duration in days}} * {{tl|Time ago}} -->
Summary:
Please note that all contributions to NowMusic Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
NowMusic Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)