Thank you for being patient! We're working hard on resolving the issue
DateRegion maps a date-only value into the concrete timezone-aware spans that
represent that date in a TimezoneRegion.
Most dates have one fragment. A date with a timezone transition can have multiple fragments because the same logical day is split across different offsets.
import { TimezoneRegion, naivedate, type Tzname } from "@tento-chrono";
const tz = await TimezoneRegion.get("America/Los_Angeles" as Tzname);
const region = tz.date(naivedate(2026, 3, 8));
const fragments = region.dateFragments();
DateRegion.date returns the whole-day DateTime.Range<FixedOffset>.
dateFragments() returns the renderable pieces of that day. shift() reports
the time shift between adjacent fragments when a transition is present.
DateFragment wraps a DateTime.Range<FixedOffset> and the parent
TimezoneRegion.
Important properties and methods:
start and end are timezone-aware datetimes.length is the wall-clock duration of the fragment.tzabbr returns the display abbreviation or signed offset.comparison(other) describes the shift between two fragments.clamp(window) clips the fragment to a TimeOfDay.Range.DateFragment.Windowed applies calendar-view constraints to a fragment.
It supports two independent constraints:
partialWindow clips to absolute local NaiveDateTime boundaries, such as a
scrolled viewport.validHours clips to a recurring time-of-day window, such as business hours
or an overnight schedule.applyAll() applies the partial window first and then valid hours. This order
matters because valid hours describe what is allowed inside the currently
visible window.
Calendar UI should use fragments instead of assuming every day is 24 continuous hours. Fragment-aware rendering handles:
If feature code needs pixel positioning, prefer
DateFragment.Windowed.getPositioning() over recalculating fragment heights.