Skip to main content

shared/src/types/isodate-types

Type Aliases

Type AliasDescription
ISOStringRepresents an ISO 8601 date string (e.g., "2024-07-31T14:30:00.000Z") This is a branded type to ensure type safety when working with date strings

Functions

FunctionDescription
fromISOStringConverts an ISO string back to a Date object
isISOStringType guard to check if a string is a valid ISO date string
nowAsISOStringCreates an ISO string from the current date/time
parseISOStringSafely parses a string to an ISO string with validation
toISOStringCreates an ISO string from a Date object