node-dextrin - v0.4.0
    Preparing search index...

    Class export=

    DXN datetime (@datetime "...") — an instant with the offset it was written at, to the nanosecond (DXN.md §1.3). DXN 0.2's timestamp is this type at offset 0, written Z (Jan, 2026-10-20: one type, not two). Stored as { epochNanoseconds, offsetMinutes }, mirroring .dxnb's own wire shape (DXN.md §2.2) directly.

    Close native fit: JS Date is a UTC epoch-ms instant, so toDate()/fromDate() keep the instant to the millisecond — Date holds nothing finer — and drop the offset, which Date has no concept of; a native Date given to the encoder is a datetime in UTC.

    Index
    • Parameters

      • epochNanoseconds: bigint

        since 1970-01-01T00:00:00Z.

      • OptionaloffsetMinutes: number = 0

        the offset it is written at, -1439 to 1439; 0, UTC, when not given.

      Returns export=

    dxnType: string
    epochNanoseconds: bigint
    offsetMinutes: number
    • Returns Date

      the same instant, offset dropped (see class doc); lossy beyond millisecond precision.

    • Parameters

      • date: Date
      • OptionaloffsetMinutes: number = 0

        the offset to write it at; UTC when not given — a plain Date has no offset of its own.

      Returns export=