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.

22 lines • 868 B
/** * The check behind `isValidEpcisEventTime`: an EPCIS `eventTime`, an ISO 8601 instant with an * explicit offset. * * @param value the candidate; a value that is not a string is not an event time * @returns whether it is a real event time * * @example isEpcisEventTime("2024-03-15T12:30:45.123Z") // true * @example isEpcisEventTime("2024-02-30T12:30:45Z") // false */ export declare function isEpcisEventTime(value: unknown): boolean; /** * The check behind `isValidEpcisTimeZoneOffset`: an EPCIS `eventTimeZoneOffset`, `+HH:MM` or * `-HH:MM`. * * @param value the candidate; a value that is not a string is not an offset * @returns whether it is a real EPCIS offset * * @example isEpcisTimeZoneOffset("+05:30") // true * @example isEpcisTimeZoneOffset("+24:00") // false */ export declare function isEpcisTimeZoneOffset(value: unknown): boolean;