php-dextrin

Temporal.php

Table of Contents

Classes

Temporal
ISO 8601 parsing/formatting shared by the `.dxn` text parser and printer for `date`/`time`/`timestamp`/`datetime`/`duration` -- one implementation so encode/decode never drift apart. Builds instants via `DateTimeImmutable` (constructing the wall-clock value directly in the relevant `DateTimeZone`, then reading back the UTC epoch) rather than hand-rolling epoch arithmetic -- PHP's own offset handling is already correct, unlike JS, which needed a hand-written floor-division helper to get pre-epoch instants right.
On this page

Search results