@date-fns/tz
Version:
date-fns timezone utils
15 lines • 596 B
TypeScript
/**
* The function extracts UTC offset in minutes from the given date in specified
* time zone.
*
* Unlike `Date.prototype.getTimezoneOffset`, this function returns the value
* mirrored to the sign of the offset in the time zone. For Asia/Singapore
* (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.
*
* @param timeZone - Time zone name (IANA or UTC offset)
* @param date - Date to check the offset for
*
* @returns UTC offset in minutes
*/
export declare function tzOffset(timeZone: string | undefined, date: Date): number;
//# sourceMappingURL=index.d.ts.map