UNPKG

is-x-time

Version:

Returns boolean for various time-of-day queries such as isNight and isBusinessHours

37 lines (35 loc) 1.88 kB
import { IANATimeZone } from "./types/iana-tz"; import { AWSRegionCode } from "./types/aws-region-codes"; export function nowHour(): number; export function nowHourIn(tz: IANATimeZone): number; export function nowHourInAWS(awsrc: AWSRegionCode): number; export function isDayTime(): boolean; export function isDayTimeIn(tz: IANATimeZone): boolean; export function isDayTimeInAWS(awsrc: AWSRegionCode): boolean; export function isNightTime(): boolean; export function isNightTimeIn(tz: IANATimeZone): boolean; export function isNightTimeInAWS(awsrc: AWSRegionCode): boolean; export function isNight(): boolean; export function isNightIn(tz: IANATimeZone): boolean; export function isNightInAWS(awsrc: AWSRegionCode): boolean; export function isMorning(): boolean; export function isMorningIn(tz: IANATimeZone): boolean; export function isMorningInAWS(awsrc: AWSRegionCode): boolean; export function isAfternoon(): boolean; export function isAfternoonIn(tz: IANATimeZone): boolean; export function isAfternoonInAWS(awsrc: AWSRegionCode): boolean; export function isEvening(): boolean; export function isEveningIn(tz: IANATimeZone): boolean; export function isEveningInAWS(awsrc: AWSRegionCode): boolean; export function isBusinessHours(): boolean; export function isBusinessHoursIn(tz: IANATimeZone): boolean; export function isBusinessHoursInAWS(awsrc: AWSRegionCode): boolean; export function isDayShift(): boolean; export function isDayShiftIn(tz: IANATimeZone): boolean; export function isDayShiftInAWS(awsrc: AWSRegionCode): boolean; export function isEveningShift(): boolean; export function isEveningShiftIn(tz: IANATimeZone): boolean; export function isEveningShiftInAWS(awsrc: AWSRegionCode): boolean; export function isNightShift(): boolean; export function isNightShiftIn(tz: IANATimeZone): boolean; export function isNightShiftInAWS(awsrc: AWSRegionCode): boolean;