Meridian
A page of today's light for any city, set like a letterpress broadside. The sun's position is calculated in your browser.
Open Meridian

In one line
A page of today’s light for any city, printed as a letterpress broadside. The sun is solved in the browser, and the page is honest about the days that don’t fit the clock.
The brief (to myself)
Show that I can compose a page, not only build a workbench. The page has to look printed, work on a phone, and be boringly correct about the sun, including polar day and night and the 23- and 25-hour days around a clock change.
What it does
- Choose a place. The headline is the control. Type a city, with or without accents (
tromsofinds Tromsø,kolnfinds Köln), or use your location. - Read the day. Sunrise in black, sunset in the one red ink, the length of daylight, and first and last light.
- See the day. A printed rule runs from midnight to midnight: daylight in solid ink, twilight as halftone. Drag the index mark and the readout moves with it. It gives the time, the sun’s height and what comes next: “Now 14:00 · Sun 22° above the horizon · Sunset in 2 h 37 m”.
- Jump to a moment. Press a printed time (sunrise, sunset, first or last light) and the index moves there.
- Move through days with the arrows, or pick a date. The dateline names the weekday.
- Share or print. The link carries the place, plus the day and the time if you set them. Print gives one clean page.
Key decisions and trade-offs
- Wood type that fits itself. The place name is set in Anybody, a variable face with a width axis. Each line is fitted to the measure the way a compositor chose a condensed or extended cut of wood type: AMMAN sets wide and NEW YORK CITY condensed. HO CHI MINH CITY breaks onto two even lines. A small SVG filter wears the ink into grain. Two faces in total, not one per element.
- The day is drawn, not described. The spec’s one-liner was “the length of the day as something you can see”, and the first pass had no picture of the day at all. The rule makes it literal, and it gives the time scrub a place to live.
- Honest clock.
- Polar day reads “The sun does not set”. Polar night reads “The sun does not rise”, and it still lists the twilight when there is some.
- In Tromsø in mid-May, the sun sets at 00:29 and rises at 00:51. The page says exactly that, and the day still counts 23 h 38 m of daylight.
- On New York’s spring-forward day, the sheet says “A 23-hour day. The clocks go forward”. The rule is 23 hours long.
- The sun, solved by hand.
- The NOAA solar equations, with no astronomy library.
- A minute-by-minute pass finds every time the sun crosses the horizon (−0.833°) and civil twilight (−6°). Bisection refines each one.
- Daylight is the total time above the horizon, not sunset minus sunrise.
- Tested against NOAA’s 2026 tables within a minute, and against a brute-force minute count on polar-edge and clock-change days.
- A day starts where the date starts. Santiago and Havana change the clock at midnight, so their day starts at 01:00. The day’s start is found by search, not assumed.
- The URL is the state.
- The place, an optional day, and an optional wall-clock time (
at=16:00). - Changing the place or the day adds a history entry, so Back works.
- The scrub updates the URL once you let go. Safari throttles history writes, and a drag would otherwise trip it.
- The right-hand end of the rule is
at=24:00, so a link to the end of the day doesn’t reopen at its start.
- The place, an optional day, and an optional wall-clock time (
- Real names, small first paint.
- 11,615 GeoNames cities, using their real UTF-8 names. ASCII spellings are kept as search aliases. Numbered districts are dropped. US towns show their state, so the Springfields can be told apart.
- The page ships only one city per time zone, enough to paint your local sheet at once. The full list (300 kB gzipped) loads when you search.
- First-paint JavaScript fell from about 530 kB to 90 kB gzipped.
- Static, no backend. Astro with one React island, on Cloudflare Workers static assets. No accounts, cookies or analytics.
Process
The first pass followed the approved comp too literally. It copied the picture’s 16:9 frame as absolute positions and used six typefaces picked by a font-matching script. It scored 20/40 in a design critique. At 360px the whole poster was a strip in the top quarter of the screen, and the time scrub changed nothing you could see.
The review also found real bugs:
- Tromsø showed “0 h 0 m” of daylight in May.
- Pressing Enter in the city search asked for your location instead of picking the city.
- Zürich and Köln couldn’t be found, because the data used GeoNames’ German ASCII spellings.
The rebuild kept the comp’s world and dropped its geometry.
A month after launch I audited the sheet the way a stranger would use it. I tried it at laptop and phone sizes, keyboard only, in print, and on the odd days. I looked at every control in each of its states, and I asked what the page should let you do that it didn’t. It found eleven problems:
- Printing from a desktop cut the place name to “NEW YORK C”. The fitted size was in screen pixels. It is now a share of the masthead’s width, so it fits any page.
- Enter on a typo still asked for your location, because “Use my location” was highlighted whenever no city matched. Nothing is highlighted now, and Enter pressed while the list is loading waits for it.
- White nights in Tromsø said “Twilight all night. The sun stays within 6° of the horizon”, with the sun 44° up at noon. They now say “No full dark”, and the midnight sun is no longer called twilight.
- On phones narrower than 381px, a hidden measuring copy of the masthead let the page scroll sideways.
- You couldn’t see whether the index was following the clock. “now” only reached screen readers. The readout now says “Now” and rides with the index.
- Copy link and Print sat below the fold on every laptop. On wide screens the foot is now one row.
The smaller fixes:
- Small mastheads take the fine grain, so “CITY” no longer prints as “C!TY”.
- Hyphenated names break after a dash.
- The end of the day reads 24:00.
- “Link copied” resets when the link changes.
- Shift with an arrow moves a quarter of an hour.
The brief also said “how much light is left”, and the sheet never said it. The readout now does: “Sunset in 2 h 37 m”, or “First light in 8 h 16 m” after dark.
Bugs worth telling
- “Daylight 0 h 0 m” in Tromsø in May. The solver took the first crossing of the day. On a night where the sun dips for 22 minutes, that crossing is the previous evening’s sunset.
- Enter picked “Here”. The location option was first in the list, and the highlighted index reset to 0 on every keystroke.
- Zürich didn’t exist. GeoNames’ ASCII column spells it “Zuerich”, and Köln “Koeln”.
Number(null)is 0. A missing time parameter pinned the scrub at midnight. That was found in the first pass.calc(var(--size) * 100cqw / 1280)is invalid when the variable is a length. That was also from the first pass, and moot once the fixed frame went.- A hidden span widened the page. The masthead is measured with an off-screen copy at 100px. It was positioned
absolute, so on a 360px phone the page could scroll sideways. Afixedbox doesn’t extend the scroll area.
Cut from v1 (deliberately)
Moon, weather, maps, geocoding, alternate-language names (Cologne for Köln), accounts, analytics, and a source link.
What could come next
- English exonyms in search (Cologne for Köln; GeoNames already uses Munich and Vienna). That needs GeoNames’ alternate-names file, about 10× the data.
- A printable A3 poster export as SVG or PDF.
- Solstice and equinox marks on the rule, and a “same day elsewhere” comparison.