الگو:تاریخ-تولد و سن/توضیحات
این زیرصفحهٔ مستندات الگو:تاریخ-تولد و سن است. این شامل اطلاعات استفاده، الگوها، پیوندهای بین زبانی و سایر اطلاعات است که در اصل الگو صفحه قرار نمیگیرد. |
این الگو از لوآ استفاده میکند: |
{{Birth-date and age}} displays a person’s birth date and age. Besides calculating the age of the person, the benefit of using this template is to allow for the inclusion of hidden microformat dates, which may be indexed or searched by software tools.
Note: The template may not calculate the age correctly if a full date (month, day, year) is not provided. For example, a person who was born in 1941 could be either خطای عبارت: نویسه نقطهگذاری شناخته نشده «۲» or خطای عبارت: نویسه نقطهگذاری شناخته نشده «۲», depending on whether they have reached their birthday in the current year:
{{تاریخ-تولد و سن|1941}}
→ ۱۹۴۱ (۸۳ سال){{تاریخ-تولد و سن|ژوئیه 1941}}
→ تاریخ درست نیست٫ سال باید ۴ رقم داشته باشد٫ (برای سالهای پیش از هزار، صفر بیفزایید٫)٫ (خطا: نیازمند سال، ماه، روز معتبر سال)
When only the year is known, consider using {{Birth year and age}} instead:
{{سال تولد و سن|1941}}
→ 1941 (۸۲–۸۳ سال){{سال تولد و سن|1941|خطای عبارت: نویسه نقطهگذاری شناخته نشده «۰»}}
→ 1941 (خطای عبارت: عملگر < دور از انتظار سال)
Usage
ویرایش- Format
{{تاریخ-تولد و سن| birth date }}
{{تاریخ-تولد و سن| birth date | wikitext to display in place of 'birth date'. Like the right hand parameter in a wikilink, this could be alternate text, links, templates etc. }}
Examples
ویرایشMonth first format: Sample below displays آوریل ۱۲, ۱۹۴۱, with invisible microformat date: 1941-04-12
(۸۳ سال)
|
Day first format: Sample below displays ۱۲ آوریل ۱۹۴۱, with invisible microformat date: 1941-04-12
(۸۳ سال)
|
Year only, year and month only: Sample below displays ۱۹۴۱, with invisible microformat date: 1941
(۸۳ سال)
|
Demo of ISO date, as well as alternate displays. Sample below displays Twelfth of آوریل, ۱۹۴۱, with invisible microformat date: 1941-04-12
(۸۳ سال)
|
Microformat output
ویرایشBirth date and age templates:
{{تاریخ-تولد و سن|31 December 2016}}
← ۳۱ دسامبر ۲۰۱۶ (۷ سال)۳۱ دسامبر ۲۰۱۶<span style="display:none">&#۱۶۰;(<span class="dtstart bday">۲۰۱۶-۱۲-۳۱</span>)</span> (<span class="currentage"></span>۷ سال)
{{تاریخ تولد و سن|2016|12|31|df=y}}
← ۳۱ دسامبر ۲۰۱۶ (۷ سال)۳۱ دسامبر ۲۰۱۶ ‏(<span class="currentage"></span>۷ سال)
Parameters
ویرایش{{تاریخ-تولد و سن|birth date|additional parameters}}
Parameter | Default | ||
---|---|---|---|
(required) | 1 | Birth date. May be year only, year and month, year month and day, expressed in natural formats: e.g.: 24 August 1953, 1955-08-25, Sunday, December 7, 1941. If parameter three is not specified, the birth date is displayed in exactly this format. This value as well as parameter 2 may not include links. If links or templates that do not evaluate as recognizable dates are desired, use parameter 2. | – |
(optional) | 2 | The birth date to display. This may include links or templates, or any combination of them, and overrides parameter 1. | parm 1 |
(optional) | bce | If birth date is BC, set to "b". | – |
(optional) | gregorian | If Julian date is used, this parameter is required. The date provided is used for emitting the correct microformat translation of the birth date. | parm 1 |
(optional) | dt | This value if present is the ایزو ۸۶۰۱ value emitted to indicate microformat birth date. It overrides any calculated value. | – |
Supporting templates
ویرایشTracking categories
ویرایش- رده:Birth-date and age transclusions with invalid parameters (۲۰)
- رده:Date of birth not in Wikidata (۰) – added by Template:Birth-date
- رده:Articles without Wikidata item (۰) – added by Template:Birth-date and other templates
See also
ویرایش