@duffel/components
Version:
Component library to build your travel product with Duffel.
11 lines (10 loc) • 403 B
TypeScript
/**
* Creates JS date object based on an ISO string.
* It adds a safe times to date only strings so it can be safely used by Intl
* without breaking based on locale.
*
* This function return null if the string cannot be parsed into a Date
*
* @param fromISO The ISO-8601 date string to be converted into a JS date object
*/
export declare const getDateObject: (fromISO: string) => Date | null;