• गृह पृष्ठ
  • कुनै पनि एक लेख हेर्नुहोस्
  • नजिकैको
  • प्रवेश गर्नुहोस्
  • मेरो अभिरुचिहरू
  • दान
  • विकिपिडियाको बारेमा
  • अस्वीकारोक्तिहरू
विकिपिडिया

ढाँचा:Age in days

  • भाषा
  • अवलोकन
  • सम्पादन
ढाँचा कागजात[हेर्नुहोस्] [सम्पादन गर्नुहोस्] [इतिहास] [ताजा गर्नुहोस्]
WarningThis template is used on approximately २,६०० pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
यो ढाँचाले लुआ प्रयोग गर्दछ:
  • Module:Age
Shortcut
  • {{aid}}

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

विषयसूची

  • १ Usage
    • १.१ Full dates
    • १.२ Year, month and day
    • १.३ Sorting
    • १.४ Formatting
    • १.५ Showing the unit
    • १.६ Rounding
    • १.७ Time zones
  • २ See also

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 ७४६
{{age in days|27 May 2002}} gives ७,५५०
{{age in days||{{#time:j M Y|+ 15 months}}}}  gives त्रुटि: दोस्रो मिति वर्ष, महिना, दिन हुनुपर्दछ

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 ३३५
{{age in days|2007|5|24}} gives ५७२७

Sortingसम्पादन

By adding |sortable=on a sort key will be added to the output for use in sortable tables. The sort key is produced by {{nts}} and is based on the SI unit of time (the second).

Formattingसम्पादन

Three styles of formatting are possible.

|format=raw gives unformatted numbers with hyphens as minus signs[१] (for use in further calculations).
|format=commas  gives numbers formatted with commas (using {{formatnum:}}) and true minus signs.
|format=gaps gives numbers formatted with thin spaces (using {{val}}) 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.

Roundingसम्पादन

The template rounds down to the nearest number of full days.

Time zonesसम्पादन

As noted above, date parameters left undefined default to their current value. Note that this is the current UTC value. Instead of leaving the parameter blank, however, an offset may be added, for example, {{age in days|28 December 2007|+ 5 hours 45 min}} will give the number of days since the king of Nepal was deposed.[dubious – discuss] Note that this will only work when entering full dates (e.g. {{age in days|2007|12|28|+ 5 hours 45 min}} will produce an error message).

See alsoसम्पादन

विकिमिडिया कमन्समा Template:Age in days सम्बन्धी अन्य सामग्रीहरू रहेका छन्।
  • Wikipedia:Age calculation templates
  • {{Duration in days}}
  • {{Time ago}}
  • हे
  • वा
  • स
Birth, death and age templates
Birth, death, age
Template  Description / use 
{{BirthDeathAge}} Combines functions of {{birth date}}, {{birth-date}}, {{birth date and age}}, {{birth year and age}}, {{death date}}, {{death-date}}, {{death date and age}} and {{death year and age}}.
{{birth date}} To display a birth date and related hidden metadata.
{{birth-date}}
{{birth date and age}} {{birth date}} with suffix "(age N)".
{{birth date and age2}} {{birth date and age}} plus age as of a specified date.
{{birth-date and age}} As {{birth date and age}} but accepts dates in text form ("15 June 1950", "June 15, 1950", "June 1950", etc).
{{birth year and age}} Year of birth and approximate age.
{{birth based on age as of date}} To display approximate birth year and current age given a particular date (e.g. when a dated reference mentions the age of a person).
{{birth based on age at death}} To display approximate birth year based on age at death.
Template  Description / use 
{{death date}} To display a death date and related hidden metadata.
{{death-date}}
{{death date and age}} {{death date}} with suffix "(aged N)". Also called with {{event date and age}}
{{death-date and age}} As {{death date and age}} but accepts dates in text form ("15 June 1950", "June 15, 1950", "June 1950", etc).
{{death date and given age}} To display a death date and specified age.
{{death year and age}} To display a year of and approximate age at death.
Age only
Template  Description / use 
{{age in years, months, weeks and days}} Number of complete years, months, weeks and days between two dates.
{{age in years, months and days}} Number of complete years, months and days between two dates.
{{age in years and months}} Number of complete years and remaining months between two dates.
{{age in years and days}} Number of complete years and remaining days between two dates.
{{age in years and days nts}} {{age in years and days}} with output formatted for use in sortable tables.
{{age in decimal years}} Number of years between two dates, rounded to the specified number of decimal places.
{{age in years}} Number of years between two dates.
{{age in years nts}} {{age in years}} with output formatted for use in sortable tables.
{{age in months}} Number of months between two dates.
{{age in weeks and days}} Number of weeks and days between two dates.
{{age in weeks}} Number of weeks between two dates.
{{age in days}} Age in days between two dates.
{{age in days nts}} {{age in days}} with output formatted for use in sortable tables.
Template  Description / use 
{{age}} Age based on number of complete years between two dates.
{{age nts}} {{age}} with output formatted for use in sortable tables.
{{age as of date}} Current age (in years) from a known age at a specified date.
{{age for infant}} Current age for infant: months and days up to one year, years and months up to three years, and years beyond.
Start / end dates
Template  Description / use 
{{start date}} / {{end date}}
{{start-date}} / {{end-date}}
{{start date and age}}
{{end date and age}}
Miscellaneous
Template  Description / use 
{{OldStyleDate}} Dates pre-1584 in Julian calendar
  • About age calculation templates
  • Date mathematics templates
माथिको कागजात ढाँचा:Age in days/docबाट समावेश गरिएको छ। (सम्पादन गर्नुहोस् | इतिहास)
सम्पादकहरूले यस ढाँचाको प्रयोगस्थल (सिर्जना गर्नुहोस् | नक्कल गर्नुहोस्) र परीक्षण (सिर्जना गर्नुहोस्) पृष्ठहरूमा प्रयोग गर्न सक्छन्।
/doc उपपृष्ठमा श्रेणीहरू थप्नुहोस्। यस ढाँचाका उपपृष्ठहरू।
"https://ne.wikipedia.org/w/index.php?title=ढाँचा:Age_in_days&oldid=1076216" बाट अनुप्रेषित
अन्तिम सम्पादन १० सेप्टेम्बर २०२२, २१:०५
विकिपिडिया
  • यो पृष्ठलाई अन्तिमपटक २१:०५, १० सेप्टेम्बर २०२२ मा परिवर्तन गरिएको थियो।
  • सामाग्री CC BY-SA 3.0 अनुसार उपलब्ध छ, खुलाइएको अवस्था बाहेकको हकमा।
  • गोपनियता नीति
  • विकिपिडियाको बारेमा
  • अस्वीकारोक्तिहरू
  • प्रयोगका शर्तहरू
  • डेस्कटप
  • विकासकर्ताहरू
  • तथ्याङ्कहरू
  • स्मृतिशेष विवरण