IngameDateTime_Dev > Ingame Calendar > Format Duration

Format Duration

Formats a duration with the given format string, which can be any string, using {PeriodId} to insert elements of the duration value.
The duration will be automatically split up into units starting with the largest specified in the format string.

For example, with a duration value of exactly 7 days:
"{Day} days, {Hour}h {Minute}m {Second}s" -> "7 days, 0h 0m 0s"
"{Second}s" -> "604800s"

Inputs

Target
Ingame Calendar Object Reference

Duration
Ingame Duration Structure (by ref)

Input duration value to format

Format Str
String

Outputs

Return Value
Text

Duration formatted as text