Skip to main content
Version: v0.0.4

Interface: DicomDate

A tolerantly-decoded DA (Date) value. raw always carries the on-wire string (PHI-safe - a date is not an identifier on its own, but is preserved verbatim regardless). valid is true only when the string parsed cleanly to a YYYYMMDD calendar date; otherwise the numeric fields are omitted and raw is the source of truth.

Example

import type { DicomDate } from "@cosyte/dicom";
const d: DicomDate = { raw: "20240115", valid: true, year: 2024, month: 1, day: 15 };

Properties

day?

readonly optional day?: number


month?

readonly optional month?: number


raw

readonly raw: string


valid

readonly valid: boolean


year?

readonly optional year?: number