قالب:منذ سنة شهر يوم
| هذا القالب مصمم على نحو معقد. ينصح بتجربة التعديلات في الملعب أوَّلًا. |
| هذا القالب يستعمل لوا: |
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}}← 17 سنة، و2 شهران و1 يوم{{منذ سنة شهر يوم/ملعب|day=15|year=2001|month=1}}← 25 سنة، و5 أشهر و1 يوم{{منذ سنة شهر يوم/ملعب|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}}← 15 سنة و8 أو 9 أشهر{{منذ سنة شهر يوم/ملعب|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}}← 25 سنة، و5 أشهر، و1 يوم{{منذ سنة شهر يوم/ملعب|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
| رقم | اختياري |
| Month ('to' date) | 5 | Number of the month of the 'to' date, if required
| رقم | اختياري |
| Day of month ('to' date) | 6 | The day of the month of the 'to' date, if required
| رقم | اختياري |
| Serial comma | sc | Enter 'y' to turn on the serial comma after the months
| سطر | اختياري |
طالع أيضاً
[عدل المصدر]
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||