@leafygreen-ui/date-utils
Version:
LeafyGreen UI Kit Date Utils
16 lines • 517 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-11-01T01:00Z"), // Nov. 1 UCT, but 11:00 on Oct. 31 in NYC
* Date("2023-10-31T00:00Z"), // 00:00 on Oct 31 2023 in UTC
* "America/New_York"
* )
* // Returns `true`
*/
export declare const isSameTZMonth: (zoned: DateType, utc: DateType, timeZone: string) => boolean;
//# sourceMappingURL=isSameTZMonth.d.ts.map