API reference
@salmonui/core/dates
17 exported symbols: 5 functions, 6 interfaces and 6 types. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/core/dates';Functions
getRangeDaysInclusive number of days of a range; 0 for null.toDateThe Date (instant) of a plain date or date-time: its wall time in timeZone (DST resolved like Temporal 'compatible'), else in the host zone. An invalid value o…toPlainDateNormalizes a DateInput (an invalid input is null; never throws).toPlainDateTimeNormalizes a DateTimeInput; a date-only input is midnight.toPlainTimeNormalizes a TimeInput; a date-time input keeps its time part.
Interfaces
DateRangeAn inclusive range of two values.PlainDateA frozen ISO calendar date. String(date) and JSON.stringify give YYYY-MM-DD.PlainDateLikeAnything with ISO calendar date fields (Temporal.PlainDate included). Month is 1-12.PlainDateTimeA frozen date and wall-clock time. String(value) gives YYYY-MM-DDTHH:mm:ss.PlainTimeA frozen wall-clock time. String(time) gives HH:mm:ss (.sss when milliseconds are set).PlainTimeLikeAnything with wall-clock time fields (Temporal.PlainTime included).
Types
DateInputA date value: fields, a Date (an instant, read in the time zone) or an ISO 8601 string ('2026-11-23').DateTimeInputA date-time value: fields, a Date or an ISO date-time string ('2026-11-23T14:30').PlainDateTimeLikeTimeInputA time value: fields, a Date or an ISO time string ('14:30', '14:30:05').WeekRuleWhich week of January is week 1.WeekdayFormat