قالب:العمر بالأسابيع

توثيق القالب[عرض] [عدل] [تاريخ] [مسح الكاش] [استخدامات]

This template returns the number of weeks that have elapsed between two dates. If the second set of parameters is not included it will automatically calculate the days between a given date and today.

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

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

  • {{Age in weeks|day1=14|year2=1946|year1=1946|month2=8|month1=6|day2=19}} ينتج: ← 9
  • {{Age in weeks|1946|6|14|1946|8|19}} ينتج: ← 9
  • {{Age in weeks|1946-6-14|1946-8-19}} ينتج: ← 9
  • {{Age in weeks|14 June 1946|Aug 19, 1946}} ينتج: ← 9
  • {{Age in weeks|day1=07|month1=11|year1=2012}} ينتج: ← 404
  • {{Age in weeks|7 November 2012}} ينتج: ← 404

An error is shown if an entered date is not valid (1900 was not a leap year).

  • {{Age in weeks|31 January 1899|29 February 1900}} ينتج: ← خطأ: Second date should be year, month, day