الگو:Adt

از ویکی‌پدیا، دانشنامهٔ آزاد
پرش به: ناوبری، جستجو

accessdate=۲۰۱۴-۰۹-۰۳

Adt is designed to be used with most Citation templates by providing the proper syntax and fieldname for the standardized field 'accessdate' needed when citing an URL in most of those templates.

Usage[ویرایش]

This template MUST be subst'd.

When subst'd, the template provides the ISO date field and word string

"accessdate=CURRENTYEAR-CURRENTMONTH-CURRENTDAY" (all numeric with proper leading zero's)

Alternatively, it can be used to record an older date:

"accessdate={{{3}}}-{{{2}}}-{{{1}}}", of which any one, two, or all three may be specified, and again will add proper leading zero's and format the output.

Examples[ویرایش]

  1. |{{subst:Adt|three days ago}} — generates the string with the date of three days ago.
    Given: |{{subst:Adt|5}} it will generate:
    |accessdate=۲۰۱۴-۰۹-05
  2. |{{subst:Adt|three days ago|lastmonth}} — generates the string with the date of three days ago, which was in the different last month.
    Given: |{{subst:Adt|3|10}} it will generate:
    |accessdate=۲۰۱۴-10-03
  3. "Last year"—has been left as an exercise for the pupil!
نشان توضیحات توضیحات الگو [ویرایش] [تاریخچه] [پاکسازی میانگیر]

Adt creates the 'accessdate' field and value in YYYY-MM-DD format for most Citation templates.

Access dates may be implemented in three formats and should be consistent throughout the article:

  • YYYY-MM-DD: ۲۰۱۴-۰۹-۳
  • MYD: سپتامبر ۳, ۲۰۱۴
  • DMY: ۳ سپتامبر ۲۰۱۴

Usage[ویرایش]

This template MUST be subst'd.

When subst'd, the template provides the YYYY-MM-DD date field and word string

"accessdate=CURRENTYEAR-CURRENTMONTH-CURRENTDAY" (all numeric with proper leading zero's)

Alternatively, it can be used to record an older date:

"accessdate={{{3}}}-{{{2}}}-{{{1}}}", of which any one, two, or all three may be specified, and again will add proper leading zero's and format the output.

Examples[ویرایش]

  1. |{{جا:adt|three days ago}} — generates the string with the date of three days ago.
    Given: |{{جا:adt|5}} it will generate:
    |accessdate=۲۰۱۴-۰۹-05
  2. |{{جا:adt|three days ago|lastmonth}} — generates the string with the date of three days ago, which was in the different last month.
    Given: |{{جا:adt|3|10}} it will generate:
    |accessdate=۲۰۱۴-10-03
  3. "Last year"—has been left as an exercise for the pupil!