Home  

Random  

Nearby  



Log in  



Settings  



Donate  



About Wikipedia  

Disclaimers  



Wikipedia





Template:Age in days





Template  

Talk  



Language  

Watch  

View source  





Shortcut

This template returns the number of days between two dates. Dates may be input either as full dates or as year, month and day.

Usage

Full dates

To use, type:

{{age in days|date1|date2}}  (number of days between dates 1 and 2),
{{age in days|date1}} (number of days since date 1) or
{{age in days||date2}} (number of days until date 2)

Examples:

{{age in days|19 Aug 2008|4 Sep 2010}} gives 746
{{age in days|27 May 2002}} gives 8,077
{{age in days||{{#time:j M Y|+ 15 months}}}}  gives 457

Year, month and day

To use, type:

{{age in days|year1|month1|day1|year2|month2|day2}}  (number of days between dates 1 and 2),
{{age in days|year1|month1|day1}} (number of days since date 1) or
{{age in days||||year2|month2|day2}} (number of day until date 2)

Or with named parameters:

{{age in days|month1= |day1= |year1= |month2= |day2= | year2= }}  (number of days between dates 1 and 2),
{{age in days|month1= |day1= |year1= }} (number of days since date 1) or
{{age in days|month2= |day2= | year2= }} (number of day until date 2)

Examples:

{{age in days|2007|5|24|2008|4|23}}  gives 335
{{age in days|2007|5|24}} gives 6254

Sorting

By adding |sortable=on a sort key will be added to the output for use in sortable tables.

Formatting

Three styles of formatting are possible.

|format=raw gives unformatted numbers with hyphens as minus signs[1] (for use in further calculations).
|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 |format=raw; however when inputting dates in full it is |format=commas.

Note
  1. ^ Negative days will occur if the first date is after the second.

Showing the unit

The default is not to show units. To show the unit ("day", days" or "d") use |show unit=.

|show unit=abbr  adds "d" after the number of days.
|show unit=full adds "day" or "days" after the number of days as appropriate.

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Age_in_days&oldid=1063166592"
 



Last edited on 1 January 2022, at 16:55  


Languages

 


Afrikaans
Alemannisch
العربية
ܐܪܡܝܐ

Asturianu
Авар
Azərbaycanca
تۆرکجه
Basa Bali

 / Bân-lâm-gú
Башҡортса
Беларуская
Беларуская (тарашкевіца)

Български
Boarisch

Bosanski
Català
Cebuano
Čeština
Cymraeg
Dansk
Deutsch
ދިވެހިބަސް
Dolnoserbski

Eesti
Ελληνικά
Español
Esperanto
Euskara
فارسی
Føroyskt
Français
Galego


Հայերեն
ि
Hornjoserbsce
Ilokano
Bahasa Indonesia
Íslenska
Italiano
עברית
Jawa

Kapampangan
Къарачай-малкъар

Қазақша
Kiswahili
Kurdî
Кыргызча
Latviešu
Magyar
ि
Македонски

Māori

مصرى

Bahasa Melayu
Монгол

Nederlands


Нохчийн
Norsk bokmål
ି
Oʻzbekcha / ўзбекча

پنجابی

پښتو

Tok Pisin
Plattdüütsch
Polski
Português
Română
Русиньскый
Русский
Саха тыла
Gagana Samoa


Scots

Simple English
سنڌي
Slovenčina
Slovenščina
کوردی
Српски / srpski
Srpskohrvatski / српскохрватски
Sunda
Svenska
ி
Татарча / tatarça
 



Тоҷикӣ
Türkçe
Türkmençe
Тыва дыл
Удмурт
Українська
اردو
ئۇيغۇرچە / Uyghurche
Vèneto
Tiếng Vit

Winaray

Yorùbá

Zazaki

 

Wikipedia


This page was last edited on 1 January 2022, at 16:55 (UTC).

Content is available under CC BY-SA 4.0 unless otherwise noted.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Terms of Use

Desktop