Embed the lunar clock
One iframe, four parameters, no key and no script of ours on your page. The widget says that its values are modelled, and it links back here.
The code
Paste this where the clock should appear. Nothing else is needed: no script tag, no library, no account.
<iframe src="https://lunartime.org/embed/widget/?rate=surface-vs-geoid&epoch=tcl-1977"
width="360" height="140" style="border:0" loading="lazy"
title="Lunar clock (model) — lunartime.org"></iframe>The widget renders its numbers on our side and updates them in the iframe. It sets no cookies, loads no fonts or scripts from anywhere else, and runs no analytics — a page that carries our widget does not start reporting its readers to us or to anyone.
Parameters
All four are optional and go in the query string of the src. A value we do not recognise is replaced by the default without an error, so a typo in your CMS shows the clock rather than an empty box.
| Parameter | Accepted values | Default | What it changes | Source |
|---|---|---|---|---|
rate | surface-vs-geoid, tcl-vs-tt | surface-vs-geoid | Which pair of scales the counter names: 56.02 µs/day is a lunar surface clock against an Earth geoid clock, 58.7 µs/day is TCL against TT. The rows of the clock keep their own rate either way, because each row compares its own pair. | [1] |
epoch | tcl-1977, j2000, or a date as YYYY-MM-DD (midnight UTC) | tcl-1977 | The moment the model starts counting from. tcl-1977 is 1977-01-01, the TCL epoch; j2000 is 12:00 TT on 2000 January 1, which is 11:58:55.816 UTC and not noon UTC. | [2]Official |
theme | dark, light | dark | Which palette the widget paints itself in. It is your choice, not the reader's: the widget reads no system preference and stores nothing in your visitors' browsers. | [3] |
lines | compact, full | compact | compact shows UTC and a modelled lunar clock in 140 px; full shows UTC, TT, TCL and a lunar surface clock, with the counter and the pair of scales spelled out, in 240 px. | [3] |
Give the iframe the height of the mode you asked for. The widget does not resize its parent — an iframe cannot — so a full widget in a 140 px frame is a widget with its footer cut off. [3]
Two examples
Compact, light palette
Two rows and the caption. This is the size that fits in a sidebar or under an article without pushing anything down.
<iframe src="https://lunartime.org/embed/widget/?lines=compact&theme=light"
width="360" height="140" style="border:0" loading="lazy"
title="Lunar clock (model) — lunartime.org"></iframe>Full, TCL against TT, from J2000.0
Four rows, the accumulated counter and the pair of scales behind it. Use this one where the reader has a reason to look closely.
<iframe src="https://lunartime.org/embed/widget/?lines=full&rate=tcl-vs-tt&epoch=j2000"
width="460" height="240" style="border:0" loading="lazy"
title="Lunar clock (model) — lunartime.org"></iframe>Using it
- Free, no key, no quota. Commercial pages included. If traffic from one site starts to hurt us we will say so on this page before we do anything about it.
- The link back stays. The visible
lunartime.orglink inside the widget is part of the markup, not an option: no parameter removes it, and the widget is cross-origin, so your page's CSS cannot hide it either. That link is what the widget costs. - The values are modelled. No lunar time scale has been realized, so the widget shows what the published rate figures predict, not a reading taken on the Moon. The caption says so and cannot be switched off. [3]
- Do not restate the numbers without their pair of scales. A microsecond figure on its own — "the Moon is ahead by …" — is not true or false, it is meaningless until both clocks are named. The widget names them; text around it should too.
Behind the numbers
The arithmetic is one multiplication, and it is written out in full on the methodology page: a published rate in microseconds per day, multiplied by the time since the epoch.[3] The same model, with switches for the epoch and the rate, is the full lunar clock. If you would rather have the numbers as data than as a picture, the JSON API returns the same values with their sources attached.