Skip to main content

Module calendar

Module calendar 

Source
Expand description

The Europe/Berlin quarter-hour calendar.

A German electricity business day starts at 00:00 local time and lasts 23, 24 or 25 hours — 92, 96 or 100 quarter-hours. The day boundaries come from the metering crate, the stack’s DST-correct calendar; this module only adds the quarter-hour as a type.

A Quarter is identified by its UTC start instant, so the two 02:00–02:15 local quarters of the autumn switch are distinct and ordered.

metering speaks jiff; flexpool speaks time. This module is the one place the two meet: to_berlin and BusinessDay convert at the boundary, exactly (nanoseconds and civil dates), so no other crate calls metering for the calendar.

Structs§

BusinessDay
One Europe/Berlin electricity business day.
Quarter
One quarter-hour of a business day, identified by its UTC start instant. Serialise-only: a quarter is constructed from the calendar, never deserialised into an inconsistent state.

Enums§

CalendarError
A calendar failure: the date or instant lies outside the supported years.

Constants§

QUARTER
Fifteen minutes.

Functions§

to_berlin
instant as Europe/Berlin wall-clock time (CET or CEST), the same instant.