@maschinenlesbar.org/marktstammdatenregister-cli
    Preparing search index...

    Function formatMastrDate

    • Render a register date as ISO-8601, the way --iso-dates prints it. The register is a German one, so:

      • a date-only value — the register sends those as UTC midnight (InbetriebnahmeDatum, EinheitRegistrierungsdatum, …) — becomes the calendar date, YYYY-MM-DD;
      • an instant (DatumLetzteAktualisierung) becomes German local time with an explicit offset, 2020-02-20T17:28:35.250+01:00 (+02:00 in summer time); the milliseconds are shown only when they aren't zero. It is the same instant as the UTC form, written for a German reader. A year outside 1–9999, or an offset that isn't whole minutes (Berlin's local mean time before 1893), falls back to Date.toISOString() (UTC, Z).

      Parameters

      • date: Date

      Returns string