IF Commons GitHub

pure/time

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-quality-evidence FR-021

Days as the quality system keeps them (commons 0001-quality-evidence FR-021, FR-030): a UTC day as YYYY-MM-DD, the instant at the end of a day, and the day of an instant. Pure: the day today is always an argument.

Source: commons/quality/src/pure/time.ts

2 of 6 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Daytype
type Day = Brand<string, "Day">;

A UTC day, YYYY-MM-DD, that exists on the calendar.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

isDayfunctionno test imports it
function isDay(text: string): boolean

Whether a text is a day on the calendar.

dayDecoderconstno test imports it
const dayDecoder: Decoder<Day>

A decoder of a day.

dayOfTextfunction
function dayOfText(text: string): Result<Day, string>

A day as such, or why it is not one.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

dayOfNanosfunctionno test imports it
function dayOfNanos(nanos: bigint): Day

The UTC day of nanoseconds since the Unix epoch.

noonOffunctionno test imports it
function noonOf(day: string): Instant | undefined

The instant of noon UTC on a day: the time a day-grained piece of evidence is held to its cadence from.

Titles, headings, exports, tables, columns and requirements. Esc closes.