Skip to content

parseHour

parseHour(raw, def): number

Defined in: src/config.ts:283

Parse an hour-of-day env (0–23 integer); empty/missing/out-of-range falls back to def. Exported for tests. Guards the empty string explicitly — Number("") is 0, which would otherwise pass as a valid midnight hour.

string | undefined

number

number