Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceTime and calendar

LanguageValues and typesStandard typesTime and calendar

OpeningHours

On this page

When a place is open each week, and the days that differ.

Use it for a shop's or a clinic's hours. temporal.open_at tells you whether it is open at an instant. For repeating calendar events, use RecurrenceRule.

Shape

One value, held as text in one set form, with no parts: Mo-Th 17:00-23:00; Fr,Sa 17:00-02:00; 2026 Dec 25 off [America/New_York].

Example

example
OpeningHours("Mo-Fr 09:00-17:30; Sa 10:00-16:00 [Europe/London]")

OpeningHours(raw) checks the text, and text that isn't one breaks the format rule.

text.parse(raw, as: OpeningHours) reads one from text that comes from outside. Text that isn't one at all fails malformed, such as Mo-Fr 09:00-17:30, Mo-Fr 9:00-17:30 [Europe/London] or Mo-Fr 09:00-25:00 [Europe/London].

Good to know

  • It uses OpenStreetMap's form and ends with its zone in brackets. Times need two digits, so 9:00 is refused.
  • == tells you whether two are the same. < and list.sort_by don't take it.

In JSON

A string, in a request, a response or json.write:

json
"Mo-Fr 09:00-17:30; Sa 10:00-16:00 [Europe/London]""Mo-Th 17:00-23:00; Fr,Sa 17:00-02:00; 2026 Dec 25 off [America/New_York]"

Details

Text form, storage, how it is shown, and operations

OpeningHours is in the group Time and calendar, and has been in Jadpo since 0.1.0.

Text form

text.from writes one standard text form, the same form text.parse reads back: Mo-Fr 09:00-17:30; Sa 10:00-16:00 [Europe/London] and Mo-Th 17:00-23:00; Fr,Sa 17:00-02:00; 2026 Dec 25 off [America/New_York].

How it is stored

It is stored in one column named for the field, of type text. Mo-Th 17:00-23:00; Fr,Sa 17:00-02:00; 2026 Dec 25 off [America/New_York] is stored as 'Mo-Th 17:00-23:00; Fr,Sa 17:00-02:00; 2026 Dec 25 off [America/New_York]'.

How it is shown to people

text.format(value, locale:) shows it to people in their locale.

With locale: Locale.en_gb:

Value Shown
Mo-Fr 09:00-17:30; Sa 10:00-16:00 [Europe/London] Mo-Fr 09:00-17:30; Sa 10:00-16:00 [Europe/London]
Mo-Th 17:00-23:00; Fr,Sa 17:00-02:00; 2026 Dec 25 off [America/New_York] Mo-Th 17:00-23:00; Fr,Sa 17:00-02:00; 2026 Dec 25 off [America/New_York]

Operations

  • temporal.open_at(hours: OpeningHours, at: Instant) -> Bool: Whether hours are open at at, by the clock in their zone.

It also takes text.parse, text.from, text.format, json.read, json.write and ==. How every standard type behaves says how they work.

Markdown for agents: /docs/types/type-opening-hours.md.Built from Jadpo main at aee2e8f.