UNPKG

@leafygreen-ui/date-utils

Version:
16 lines 669 B
/** * The inverse of `getSimulatedTZDate`, returns a date object that _looks like_ * the UTC representation when printed in the local time zone. * * e.g. given `date = "2023-12-25T01:00Z"` and `timeZone = "America/Los_Angeles"`, * by default using `date.toDateString` (or similar) * this would print the locale string: * "Sun Dec 24 2023" * * This function returns a modified, (technically incorrect) date object, * such that the function `date.toDateString` (or similar) * returns the locale string: * `Mon Dec 25 2023` */ export declare const getSimulatedUTCDate: (date: Date, timeZone?: string) => Date; //# sourceMappingURL=getSimulatedUTCDate.d.ts.map