Skip to content

five-on-it / packages/shared/src/clock / withinHours

Function: withinHours() ​

withinHours(minutes, from, to): boolean

Defined in: packages/shared/src/clock.ts:97

Whether a time lies in the hours from from up to (not including) to, wrapping round midnight when to comes before from (22:00 to 06:00 is the night); from === to is the whole day.

Parameters ​

minutes ​

number

from ​

number

to ​

number

Returns ​

boolean