This template ينتج the number of full years, then surplus months, then surplus days between two specified dates. If the second set of parameters is not included, it will return the number of years, months and days between a specified date and today's date. The words "year", "month" and "day" are plural when appropriate.

The years and months are separated by a comma. Since ويكيبيديا:دليل الأسلوب and use varies, this template does not automatically place a comma after the months. If a serial comma is desired, adding |sc=y to the template invocation will include one.

See ويكيبيديا:Age calculation templates for more information on using this kind of template.

الاستخدام عدل

<code>{{منذ سنة شهر يوم|year= |month= |day= }} أو <code>{{منذ سنة شهر يوم|yyyy|mm|dd|yyyy2|mm2|dd2}}

أمثلة عدل

  • {{منذ سنة شهر يوم/ملعب|day=15|year=2009|month=4}} ← 15 سنوات، و8 أيام
  • {{منذ سنة شهر يوم/ملعب|day=15|year=2001|month=1}} ← 23 سنوات، و3 شهور، و8 أيام
  • {{منذ سنة شهر يوم/ملعب|2001|01|15|2008|09|05}} ← 7 سنوات، و7 شهور، و21 أيام
  • {{منذ سنة شهر يوم/ملعب|2016|8|4|2016|9|5}} ← 1 شهر، و1 يوم

Notes عدل

This template can handle an ambiguous start date:

  • {{منذ سنة شهر يوم/ملعب|year=2010|month=9}} ← 13 سنوات، و6 أو 7 شهور
  • {{منذ سنة شهر يوم/ملعب|2009|6||2011|2|21}} ← 1 سنة، و7 أو 8 شهور

But it cannot handle an ambiguous end date:

  • {{منذ سنة شهر يوم/ملعب|2012|11|2|2016|4}} ← 3 سنوات، و4 أو 5 شهور
  • {{منذ سنة شهر يوم/ملعب|2012|11|2|2017}} ← 4 أو 5 سنوات

Since the length of a month varies, the number of days to roll over the number of months varies.

  • {{منذ سنة شهر يوم/ملعب|2007|3|12|2015|6|11}} ← 8 سنوات، و2 شهور، و30 أيام
  • {{منذ سنة شهر يوم/ملعب|2007|3|12|2015|7|11}} ← 8 سنوات، و3 شهور، و29 أيام

To add a serial comma specify |sc=y.

  • {{منذ سنة شهر يوم/ملعب|sc=y|day=15|year=2001|month=1}} ← 23 سنوات، و3 شهور، و8 أيام
  • {{منذ سنة شهر يوم/ملعب|2001|1|15|2008|9|5|sc=y}} ← 7 سنوات، و7 شهور، و21 أيام

بيانات القالب عدل

هذا توثيق بيانات لهذا القالب، مستخدم بواسطة المحرر المرئي وأداة الترجمة والأدوات الأخرى.

بيانات قالب: «منذ سنة شهر يوم»

يعطي هذا القالب عدد السنوات الكاملة والشهور والأيام بين تاريخين محددين. إذا لم يتم تضمين المجموعة الثانية من المعلمات، فسوف تُرجع عدد السنوات والشهور والأيام بين التاريخ المحدد وتاريخ اليوم.

وسائط القالب[تحرير بيانات القالب]

وسيطوصفنوعحالة
Year ('from' date)1 year

The year of the (first) date

رقممطلوب
Month ('from' date)2 month

Number of the month of the (first) date

رقممطلوب
Day of month ('from' date)3 day

The day of the month of the (first) date

رقماختياري
Year ('to' date)4

The year of the 'to' date, if required

غيابي
the current year
رقماختياري
Month ('to' date)5

Number of the month of the 'to' date, if required

غيابي
the current month
رقماختياري
Day of month ('to' date)6

The day of the month of the 'to' date, if required

غيابي
the current day
رقماختياري
Serial commasc

Enter 'y' to turn on the serial comma after the months

غيابي
none
سطراختياري

طالع أيضاً عدل