Time Until Hour

Pure
TimeUntilHour

Calculates how many hours until a target hour, correctly wrapping past midnight.

Type: Pure (no side effects)
Category: Fortuna|Time & Date
Keywords: time & date

Inputs

NameTypeDefaultDescription
CurrentHourfloat, 0-24CurrentHour parameter
TargetHourfloat, 0-24TargetHour parameter

Outputs

NameTypeDescription
ReturnValuefloat, hours until targetReturnValue output

Example Use Cases

Example 1

Display 'Shop opens in 3 hours'.

Example 2

Calculate time until a timed event starts.