This site is supported by donations to The OEIS Foundation.

Template:Clock

From OeisWiki
Jump to: navigation, search

The {{clock}} date and time template shows the time via an analog clock display (with optional digital display under it).

Usage

{{clock}} (Coordinated Universal Time (UTC) as default)

or

{{clock|{{CURRENTTIME}}}} (Coordinated Universal Time (UTC))

or

{{clock|{{LOCALTIME}}}} (time of OEIS Wiki server local timezone)

or

{{clock|HH:mm}} (24-hour HH:mm format)

Valid input

Time (24-hour HH:mm format) as first argument.

Note:

  • Default time is Coordinated Universal Time (UTC).
  • Use {{LOCALTIME}} to get time of OEIS Wiki server local timezone.

Optional arguments:

  • clockface (default image; leave it undefined to get a plain circle)
  • radius is the clock radius (default 36)
  • units are the units associated with radius (em, px, or %). The default is px.
  • background is used to override the default clock background color (white, i.e.     )
  • needles is used to override the default clock needles color (#777, i.e.     )
  • digital is yes (default) or no (show or don't show digital time under the analog clock)
  • id (default: clock) is used as anchor when you update the timeshot (you want different id s if there are many clock rows on a page)

Examples

Testing for different times

The code


{| align="center" 
|- style="text-align: center;
| width="150px" | {{clock|08:20}}
| width="150px" | {{clock|10:10}}
| width="150px" | {{clock|12:30}}
| width="150px" | {{clock|03:00}}
| width="150px" | {{clock|05:50}}
| width="150px" | {{clock|06:00}}
| width="150px" | {{clock|09:15}}
|-
|}

gives

Clockface.png


08:20

Click here to update the time snapshot!

Clockface.png


10:10

Click here to update the time snapshot!

Clockface.png


12:30

Click here to update the time snapshot!

Clockface.png


03:00

Click here to update the time snapshot!

Clockface.png


05:50

Click here to update the time snapshot!

Clockface.png


06:00

Click here to update the time snapshot!

Clockface.png


09:15

Click here to update the time snapshot!

The code


{{clock|08:20|radius = 75|units = px|background = black|needles = black|digital = no|id = clock2}}

gives

Clockface.png


Click here to update the time snapshot!

Coordinated Universal Time (UTC) and OEIS Wiki server time


{| class="wikitable" align="center" cellpadding="4" style="background: gray; color: white; text-align: center;"
|-
| <span style="font-size: 20px;">Coordinated Universal Time (UTC)</span>
|-
|}

{{nl}}{{clock|radius = 75|units = px|background = silver|needles = purple|id = clock3}} <!-- {{clock|{{CURRENTTIME}}}} -->

{{nl}}

{| class="wikitable" align="center" cellpadding="4" style="background: gray; color: white; text-align: center;"
|-
| <span style="font-size: 20px;">Local time of OEIS Wiki server</span>
|-
|}

{{nl}}{{clock|{{LOCALTIME}}|radius = 75|units = px|background = black|needles = black|id = clock4}}

gives

Coordinated Universal Time (UTC)

Clockface.png


08:41

Click here to update the time snapshot!


Local time of OEIS Wiki server

Clockface.png


04:41

Click here to update the time snapshot!

Testing the old code (without the {{canvas}} template)


{| class="wikitable" align="center" cellpadding="4" style="background: gray; color: white; text-align: center;"
|-
| <span style="font-size: 20px;">Coordinated Universal Time (UTC)</span>
|-
|}

{{nl}}{{clock|radius = 75|units = px|background = silver|needles = purple|id = clock3|canvas = without}} <!-- {{clock|{{CURRENTTIME}}}} -->

{{nl}}

{| class="wikitable" align="center" cellpadding="4" style="background: gray; color: white; text-align: center;"
|-
| <span style="font-size: 20px;">Local time of OEIS Wiki server</span>
|-
|}

{{nl}}{{clock|{{LOCALTIME}}|radius = 75|units = px|background = black|needles = white|id = clock4|canvas = without}}

gives

Coordinated Universal Time (UTC)


08:41

Click here to update the time snapshot!


Local time of OEIS Wiki server


04:41

Click here to update the time snapshot!

See also