ढाँचा:Duration

स्वतन्त्र विश्वकोश, नेपाली विकिपिडियाबाट
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

For use in templates emitting the hAudio microformat.

Usage[सम्पादन गर्ने]

{{Duration
|h= 
|m=
|s=
}}

Where:

  • h= hours
  • m= minutes
  • s= seconds

m and s values default to zero if not set, according to the pattern below.

Parent templates[सम्पादन गर्ने]

This template can be used in:

not all of which currently emit hAudio; work to have them do so is in hand.

Examples[सम्पादन गर्ने]

  • {{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 59.
  • {{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:
  • {{Duration|||}} renders as:
  • {{Duration|1|22|34|55}} renders as: Error: Parameter number 4 should not be specified.
  • {{Duration|one|22|0}} renders as: अभिव्यक्ति त्रुटि: अज्ञात शब्द "one"।
  • {{Duration|1|22|78}} renders as: Error: 's' must not be greater than 59.
  • {{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 parsable 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.