PREVIEW · the site is new and still changing
Nerdict
← TestsReal-world data

Astronomical clock

Build an astronomical clock for New York: the time on an analog face, plus today's sunrise, sunset and moon phase, all computed in the page.

Same prompt for every model, one shot. A robot checks 14 things the model never sees. What it checks ↓ · The prompt ↓

Results

12 setups · the middle run of each
sort
Press “+ Compare” on two results to put them side by side.

Anthropic models run in Claude Code 2.1.296 · OpenAI models run in Codex CLI 0.162.0 · no harness of our own (yet) · why it matters

What the robot checks

The same 14 items for every model, written from the prompt. Scores are always out of 14, even when a page breaks halfway.

  1. Opens without a page error
  2. Test hooks present (clock face, three hands, getState)
  3. Hands show the right time (Oct 9, 14:37:21, New York)
  4. Reported time is right
  5. Sunrise and sunset in New York (±4 min)
  6. Moon phase and illumination (±4 points)
  7. After 61 s, the hands moved correctly
  8. Second date (Dec 21): hands
  9. Second date: reported time
  10. Second date: sunrise and sunset
  11. Second date: moon
  12. No uncaught exception during the session
  13. No console errors
  14. No network attempts

Left to the human eye

  • digital date visible
  • moon drawn with the right side lit
  • day/night indicator
  • beauty of the dial

The prompt

Sent as is to every model. Test v1 · checks v1: any change makes a new version.

Build an astronomical clock for New York City as ONE self-contained HTML file.

Hard rules
Read the whole prompt
Build an astronomical clock for New York City as ONE self-contained HTML file.

Hard rules
- Everything lives in a single HTML file: inline CSS and JavaScript only. No external URLs of any kind: no CDNs, web fonts, remote images or network requests. The file will be opened offline, straight from disk.
- It must run in a current desktop Chrome at 1920×1080 with zero console errors.
- All astronomy is computed in JavaScript from the current date and time. No lookup tables of dates, no network.

The clock
1. A large analog clock face drawn as inline SVG, showing the current time in New York (America/New_York), with hour, minute and second hands. The hour hand moves continuously between hours (at 2:30 it sits halfway between 2 and 3), and so does the minute hand between minutes.
2. A digital readout of the New York date and time.
3. Today's sunrise and sunset in New York (latitude 40.7128° N, longitude 74.0060° W), in New York local time, using the standard definition (the sun's upper limb on the horizon, with atmospheric refraction).
4. The current moon phase: a drawing of the moon showing the lit fraction on the correct side, the illuminated percentage and the phase name (new moon, waxing crescent, first quarter, waxing gibbous, full moon, waning gibbous, last quarter, waning crescent).
5. A 24-hour day/night indicator (for example, an arc or ring showing daylight between sunrise and sunset and where "now" is).
6. Read the time from the computer's clock (Date). Update the hands and readouts at least once per second, and recompute the sun and moon at least once per minute, because the date can change while the page is open.
7. Make it beautiful, like a luxury watch dial crossed with an observatory instrument.

Testing contract (an automated tester relies on these, so they must be exact)
- The clock face <svg> has the attribute data-face. Its center is the center of the dial.
- Each hand is an element inside it with data-hand="hour", data-hand="minute" and data-hand="second". Each hand is drawn from the center outward towards the time it points at; a counterweight tail behind the center is allowed if it is shorter than the main part.
- window.nerdict.getState() returns:
  { time: "HH:MM:SS" (New York, 24-hour), sunrise: "HH:MM", sunset: "HH:MM" (today, New York local time),
    moon: { illumination: number from 0 to 1, phase: "<one of the eight names above>" } }
- The tester controls the browser's clock (it can freeze it and move it forward), so always read the time from Date.

Output format: reply with the complete file inside a single ```html code block and nothing else.

Credit. Inspired by Brian Moore's AI World Clocks (clocks.brianmoore.com) and Bijan Bowen's clock site. Prompt, reference astronomy (cross-checked with the US Naval Observatory) and checks by Nerdict.