Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TimeSpanFormatOptions

Determines all options for time formatting. This one value actually contains 4 settings: Abbreviate / AbbreviateOff LessThan / LessThanOff Truncate Auto / Shortest / Fill / Full Range MilliSeconds / Seconds / Minutes / Hours / Days / Weeks (Min / Max)
Read time 2 minutesLast updated 13 days ago

Definition

[Flags]public enum TimeSpanFormatOptions

Fields

Value

Description

AbbreviateAbbreviates units. Example: "1d 2h 3m 4s 5ms"
AbbreviateOffDoes not abbreviate units. Example: "1 day 2 hours 3 minutes 4 seconds 5 milliseconds"
LessThanDisplays "less than 1 (unit)" when the TimeSpan is smaller than the minimum range.
LessThanOffDisplays "0 (units)" when the TimeSpan is smaller than the minimum range.
NoneSpecifies that all
timeSpanFormatOptions
should be inherited from
TimeSpanUtility.DefaultTimeFormatOptions
.
RangeDaysDetermines the range of units to display. You may combine two values to form the minimum and maximum for the range.
RangeHoursDetermines the range of units to display. You may combine two values to form the minimum and maximum for the range.
RangeMilliSecondsDetermines the range of units to display. You may combine two values to form the minimum and maximum for the range.
RangeMinutesDetermines the range of units to display. You may combine two values to form the minimum and maximum for the range.
RangeSecondsDetermines the range of units to display. You may combine two values to form the minimum and maximum for the range.
RangeWeeksDetermines the range of units to display. You may combine two values to form the minimum and maximum for the range.
TruncateAutoDisplays all non-zero values within the range. Example: "00.23:00:59.000" = "23 hours 59 minutes"
TruncateFillDisplays the highest non-zero value and all lesser values within the range. Example: "00.23:00:59.000" = "23 hours 0 minutes 59 seconds 0 milliseconds"
TruncateFullDisplays all values within the range. Example: "00.23:00:59.000" = "0 days 23 hours 0 minutes 59 seconds 0 milliseconds"
TruncateShortestDisplays the highest non-zero value within the range. Example: "00.23:00:59.000" = "23 hours"