@leafygreen-ui/date-utils
Version:
LeafyGreen UI Kit Date Utils
22 lines • 639 B
TypeScript
import { DateType } from '../types';
/**
*
* Returns whether the `zonedTime`, in a given `timeZone`,
* has the same date as the provided UTC date
*
* e.g.
* ```js
* isSameTZDay(
* Date("2023-12-26T01:00Z"), // 11:00 on Dec. 25 in NYC
* Date("2023-12-25T00:00Z"), // 00:00 on Dec. 25 2023 in UTC
* "America/New_York"
* )
* // Returns true
* ```
*
* @param zoned A Date object presumed to be in `timeZone`
* @param utc A UTC Date object
* @param timeZone An IANA timeZone string
*/
export declare const isSameTZDay: (zoned: DateType, utc: DateType, timeZone: string) => boolean;
//# sourceMappingURL=isSameTZDay.d.ts.map