moondate
Playground · Winter

Run it here.

The library compiled to JavaScript and running in this page. Change an input and the answer updates — parsed and formatted, or the next firings of a schedule. Nothing is pre-computed; it is the same code the guide prints from.

01

Parse & format

style
shape Zoned canon 2026-09-22T14:30:00+08:00 format Tuesday, 22 September 2026

The shape line is read from the text: an offset makes an instant, a date and time without one is a wall clock.

02

Next firings

Under the hood

How next finds the answer.

next starts one second after the given moment, floors to a whole second, then walks forward one second at a time until the six bit sets all agree. The search is bounded at four years — past any leap-year cycle a real schedule turns on — so an expression naming a day that does not exist returns None instead of looping.

* * * * * * │ │ │ │ │ └── day of week 0-7, or SUN-SAT │ │ │ │ └───── month 1-12, or JAN-DEC │ │ │ └──────── day of month 1-31 │ │ └─────────── hour 0-23 │ └────────────── minute 0-59 └───────────────── second 0-59, six fields only

Both 0 and 7 are Sunday. ? reads as *, which is how a day field that is not in use is usually written.

five fields, no seconds
0 9 * * MON-FRI     every weekday at 09:00
*/15 9-17 * * MON-FRI   quarter hours, 09:00-17:45
0 0 1 * *           the first of the month
0 0 29 2 *          the leap day, when it exists
Day fields are or-ed. When both day-of-month and day-of-week are restricted, a moment matches if either does. With one of them * they are and-ed, so 0 0 13 * * is only the thirteenth.