Jump to content
Wikimedia Meta-Wiki

Template:Hour/doc

From Meta, a Wikimedia project coordination wiki
This is a documentation subpage for Template:Hour.
It contains usage information, categories, and other content that is not part of the original template page.

This template simply returns the integer hour on two digits (between 00 and 23) for the time in parameter.

Syntax :
{{Hour/doc|time}}
  • The time must be in the hh:mm format (between 00:00 and 23:60 or 24:00), or can be any valid numeric expression of a real number of days.
  • For compatibility with some time indications that use 24:00 or 23:60 on leap seconds, or for the end of day, this template return 24 only for those two specific values. This allows correct computing of julian day timestamps.

Example:

  • {{HOUR|12:43}} gives 12
  • {{HOUR|1.2}} gives 01.2
  • {{HOUR|-1.2}} gives 22.8
  • {{HOUR|11.2}} gives 11.2
  • {{HOUR|{{MJD}}}} gives 04.3161689810004
  • {{HOUR|{{MJD}}+1.25}} gives 05.5661689810004

From w:Template:HOUR.

AltStyle によって変換されたページ (->オリジナル) /