الگو:Duration/توضیحات
این زیرصفحهٔ مستندات الگو:Duration است. این شامل اطلاعات استفاده، الگوها، پیوندهای بین زبانی و سایر اطلاعات است که در اصل الگو صفحه قرار نمیگیرد. |
این الگو از لوآ استفاده میکند: |
This template emits the hAudio میکروفرمت.
Usage[ویرایش]
Unformatted input[ویرایش]
An unformatted duration can be input in the first parameter: {{Duration|10:20:30}}
(hours:minutes:seconds) or {{Duration|20:30}}
(minutes:seconds). There must be a seconds value, as inputs in hours and minutes are indistinguishable from inputs in minutes and seconds.
Numbered parameters[ویرایش]
{{Duration|10|20|30}}
where parameters are hours, minutes and seconds respectively. If the hours or minutes values are zero, then leave them blank (e.g. {{Duration||20|30}}
). Minutes and seconds values default to zero, although they should ideally be specified.
h, m and s parameters[ویرایش]
{{Duration|h=10|m=20|s=30}}
where h, m and s are hours, minutes and seconds respectively. Minutes and seconds values default to zero, although they should ideally be specified.
Parent templates[ویرایش]
This template can be used in:
- {{Infobox album}}
- {{Infobox single}}
- {{Infobox song}}
In {{Infobox album}}, the microformat is added automatically if there is not one already. However, more complicated values might require this template.
Examples[ویرایش]
Unformatted input[ویرایش]
{{Duration|1:22:34}}
renders as: خطای عبارت: نویسه نقطهگذاری شناخته نشده «:»{{Duration|74:32}}
renders as: خطای عبارت: نویسه نقطهگذاری شناخته نشده «:»{{Duration|1:02:34}}
renders as: خطای عبارت: نویسه نقطهگذاری شناخته نشده «:»{{Duration|1:2:3}}
renders as: خطای عبارت: نویسه نقطهگذاری شناخته نشده «:»{{Duration|0:22:34}}
renders as: خطای عبارت: نویسه نقطهگذاری شناخته نشده «:»{{Duration|0:0:34}}
renders as: خطای عبارت: نویسه نقطهگذاری شناخته نشده «:»{{Duration|0:34}}
renders as: خطای عبارت: نویسه نقطهگذاری شناخته نشده «:»
h, m and s parameters[ویرایش]
{{Duration|h=1|m=22|s=34}}
renders as: ۱:۲۲:۳۴{{Duration|m=74|s=32}}
renders as: ۷۴:۳۲{{Duration|m=2|s=34}}
renders as: ۲:۳۴{{Duration|h=1|s=34}}
renders as: ۱:۰۰:۳۴{{Duration|h=1}}
renders as: ۱:۰۰:۰۰{{Duration|h=0|m=22|s=34}}
renders as: ۰:۲۲:۳۴{{Duration|h=0|m=0|s=34}}
renders as: ۰:۰۰:۳۴{{Duration|h=1|m=22|s=34.5678}}
renders as: ۱:۲۲:۳۴٫۵۶۷۸{{Duration|h=1|m=22|s=3}}
renders as: ۱:۲۲:۰۳{{Duration|h=1|m=2|s=34}}
renders as: ۱:۰۲:۳۴{{Duration|h=1|m=2|s=3}}
renders as: ۱:۰۲:۰۳{{Duration|h=1|m=2}}
renders as: ۱:۰۲:۰۰{{Duration|s=34}}
renders as: ۰:۳۴{{Duration|m=0|s=34}}
renders as: ۰:۳۴{{Duration|h=1|m=0|s=34}}
renders as: ۱:۰۰:۳۴{{Duration|h=1|m=22|s=0}}
renders as: ۱:۲۲:۰۰-
{{Duration|h=one|m=22|s=0}}
renders as: خطای عبارت: کلمه ناشناخته «one» -
{{Duration|h=1|m=22|s=78}}
renders as: Error:'s'
must not be greater than ۵۹٫ -
{{Duration|h=1.1|m=2.2}}
renders as: Error:'h'
and'm'
values must be integers٫
Numbered parameters[ویرایش]
{{Duration|1|22|34}}
renders as: ۱:۲۲:۳۴{{Duration||74|32}}
renders as: ۷۴:۳۲{{Duration|1|2|34}}
renders as: ۱:۰۲:۳۴{{Duration|1|2|3}}
renders as: ۱:۰۲:۰۳{{Duration|0|22|34}}
renders as: ۰:۲۲:۳۴{{Duration|0|0|34}}
renders as: ۰:۰۰:۳۴{{Duration||0|34}}
renders as: ۰:۳۴{{Duration|||34}}
renders as: ۰:۳۴{{Duration|1|22|34.5678}}
renders as: ۱:۲۲:۳۴٫۵۶۷۸{{Duration||1|22}}
renders as: ۱:۲۲{{Duration|1|22}}
renders as: ۱:۲۲:۰۰{{Duration|1|22|0}}
renders as: ۱:۲۲:۰۰-
{{Duration|1|22|}}
renders as: خطای عبارت: عملگر گمشده برای > {{Duration|0|0|0}}
renders as: (blank){{Duration|||}}
renders as: (blank)-
{{Duration|1|22|34|55}}
renders as: Error: Parameter number ۴ should not be specified٫ -
{{Duration|one|22|0}}
renders as: خطای عبارت: کلمه ناشناخته «one» -
{{Duration|1|22|78}}
renders as: Error:'s'
must not be greater than ۵۹٫ -
{{Duration|1.1|2.2}}
renders as: Error:'h'
and'm'
values must be integers٫
Microformat[ویرایش]
The HTML mark up produced by this template includes HTML classes intended to be part of an hAudio microformat, which makes an audio recording's details تجزیهکننده by computers, either acting automatically to catalogue articles across Wikipedia, or via a browser tool operated by a person, to (for example) add the subject to a playlist or database. For more information about the use of microformats on Wikipedia, please see the microformat project.
These classes may include:
- fn
- album
- description
- category
- contributor
- duration
- h
- item
- min
- photo
- position
- price
- published
- s
Please do not rename or remove these classes; nor collapse nested elements which use them.
TemplateData[ویرایش]
الگوداده Duration
For use in templates emitting the hAudio [[میکروفرمت]]
پارامتر | توضیحات | نوع | وضعیت | |
---|---|---|---|---|
Hours | h 1 | بدون توصیف
| شماره | پیشنهادشده |
Minutes | m 2 | بدون توصیف
| شماره | پیشنهادشده |
Seconds | s 3 | بدون توصیف
| شماره | پیشنهادشده |