UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

11 lines • 473 B
/** * The core of `parseRfc3339` and `isValidRfc3339DateTime`: the zoned date-time an RFC 3339 * `date-time` names. Never throws. * * @param value an RFC 3339 date-time * @returns an ISO 8601 zoned string, or `""` when `value` is not a valid RFC 3339 date-time * * @example readRfc3339("2024-03-15T12:30:45Z") // "2024-03-15T12:30:45+00:00[+00:00]" * @example readRfc3339("2024-02-30T12:30:45Z") // "" */ export declare function readRfc3339(value: string): string;