सामग्री पर जाएँ

साँचा:Age in years and days

मुक्त ज्ञानकोश विकिपीडिया से
परिचय का प्रतीक साँचा परिचय[देखें] [संपादन] [इतिहास] [पर्ज]

This template returns the number of full years and surplus days between two specified dates. If only one date is entered, the template returns the number of full years and surplus days between the specified date and today's date.

This template does not generate a sort key. In a sortable table, use {{ayd}} which redirects to {{age in years and days nts}}.

Each date can be entered in a single parameter, or each date can be entered as three parameters: year, month, day.

  • {{age in years and days|15 May 2010}}14 साल, 142 दिन
  • {{age in years and days|12 Aug 2003|24 Sep 2011}}8 साल, 43 दिन
  • {{age in years and days|19 Jan 1689}}335 साल, 259 दिन
  • {{age in years and days|1989|7|23}}35 साल, 73 दिन
  • {{age in years and days|1989|7|23|2003|7|24}}14 साल, 1 दिन
  • {{age in years and days|2007-03-02|2008-03-02}}1 साल, 0 दिन
  • {{age in years and days|1999-11-07|2112-02-15}}112 साल, 100 दिन

An error is shown if an entered date is not valid (1800, 1900 and 2100 were not leap years).

  • {{age in years and days|31 January 1892|29 February 1900}}Error: Second date should be year, month, day

The default is to separate years and days with a comma. The separator is "and" if |sep=and is used.

The default calculates an age—the day of the second date is not included in the calculation. A duration including the second date is calculated if |duration=on is used.

  • {{age in years and days|1 Jan 2011|31 Dec 2012}}1 साल, 365 दिन
  • {{age in years and days|1 Jan 2011|31 Dec 2012|sep=and}}1 साल और 365 दिन
  • {{age in years and days|1 Jan 2011|31 Dec 2012|duration=on}}2 साल, 0 दिन

Returns the number of full years and surplus days between two specified dates (or, if only one date is entered, between the specified date and today's date)

साँचे के पैरामीटर्स[साँचा डेटा सम्पादित करें]

इस साँचे के लिए पैरामीटरों के इनलाइन प्रारूपण को प्राथमिकता दी जाती है।

पैरामीटरविवरणप्रकारस्थिति
Earlier date1

The earlier date being compared

दिनांकआवश्यक
Later date2

The later date being compared

डिफ़ॉल्ट
Today's date
दिनांकसुझावित
Separatorsep

Defines a custom separator between the years and days

सुझावित वैल्यू
and
डिफ़ॉल्ट
,
स्ट्रिंगवैकल्पिक
Duration?duration

Set to "on" to include the second date in the calculation; will return a result one higher than if left off

बूलियनवैकल्पिक

साँचा:Birth, death and age templates