IngameDateTime_Dev > Ingame Calendar > Period Proportion Elapsed

Period Proportion Elapsed

Returns the proportional amount of the specified period elapsed at the given time.
Useful for driving systems that change with calendar periods, such time of day or seasonal graphical effects.

For example, with a standard calendar, any date time ending 18:30:00 would return 0.77 for Day (since it is just over
3/4 of the way through the day), or 0.5 for Hour.

Inputs

Target
Ingame Calendar Object Reference

Time
Ingame Date Time Value Structure (by ref)

Input date/time value

Period Id
Name

ID of period

Outputs

Return Value
Float

Proportion of specified period elapsed in Time.