Enum 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)
Namespace: UnityEngine.Localization.SmartFormat.Utilities
Syntax
[Flags]
public enum TimeSpanFormatOptions
Fields
| Name | Description | Value |
|---|---|---|
| InheritDefaults | Specifies that all |
0 |
| Abbreviate | Abbreviates units. Example: "1d 2h 3m 4s 5ms" |
1 |
| AbbreviateOff | Does not abbreviate units. Example: "1 day 2 hours 3 minutes 4 seconds 5 milliseconds" |
2 |
| _Abbreviate | (for internal use only) |
3 |
| LessThan | Displays "less than 1 (unit)" when the TimeSpan is smaller than the minimum range. |
4 |
| LessThanOff | Displays "0 (units)" when the TimeSpan is smaller than the minimum range. |
8 |
| _LessThan | (for internal use only) |
12 |
| TruncateShortest | Displays the highest non-zero value within the range. Example: "00.23:00:59.000" = "23 hours" |
16 |
| TruncateAuto | Displays all non-zero values within the range. Example: "00.23:00:59.000" = "23 hours 59 minutes" |
32 |
| TruncateFill | Displays 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" |
64 |
| TruncateFull | Displays all values within the range. Example: "00.23:00:59.000" = "0 days 23 hours 0 minutes 59 seconds 0 milliseconds" |
128 |
| _Truncate | (for internal use only) |
240 |
| RangeMilliSeconds | Determines the range of units to display. You may combine two values to form the minimum and maximum for the range. Example: (RangeMinutes) defines a range of Minutes only; (RangeHours | RangeSeconds) defines a range of Hours to Seconds. |
256 |
| RangeSeconds | Determines the range of units to display. You may combine two values to form the minimum and maximum for the range. Example: (RangeMinutes) defines a range of Minutes only; (RangeHours | RangeSeconds) defines a range of Hours to Seconds. |
512 |
| RangeMinutes | Determines the range of units to display. You may combine two values to form the minimum and maximum for the range. Example: (RangeMinutes) defines a range of Minutes only; (RangeHours | RangeSeconds) defines a range of Hours to Seconds. |
1024 |
| RangeHours | Determines the range of units to display. You may combine two values to form the minimum and maximum for the range. Example: (RangeMinutes) defines a range of Minutes only; (RangeHours | RangeSeconds) defines a range of Hours to Seconds. |
2048 |
| RangeDays | Determines the range of units to display. You may combine two values to form the minimum and maximum for the range. Example: (RangeMinutes) defines a range of Minutes only; (RangeHours | RangeSeconds) defines a range of Hours to Seconds. |
4096 |
| RangeWeeks | Determines the range of units to display. You may combine two values to form the minimum and maximum for the range. Example: (RangeMinutes) defines a range of Minutes only; (RangeHours | RangeSeconds) defines a range of Hours to Seconds. |
8192 |
| _Range | (for internal use only) |
16128 |