Workspace Options
The Workspace personal options allow you to select a variety of options that affect the way your workspace operates.
Select Tools > Personal Options > Workspace
Confirm |
|
||||||||||||||||||
Display |
|
||||||||||||||||||
General |
|
||||||||||||||||||
Reports |
|
||||||||||||||||||
StarTeam client log |
|
||||||||||||||||||
Advanced Options Button |
|
Time Span formats
The TimeSpan Format Pattern option lets you set a format for TimeSpan type properties.
Syntax
A sequence of format terms can be enclosed in rectangle brackets, [], to indicate that they are optional. An optional format term is included in the formatted string only if it contains at least one field-name whose value is non-zero.
format: format-term [format-term ...]
format-term: optional-term | required-term
optional-term: '[' format ']'
The following shows a parameterized term that contains a field-name, which gets replaced by a value derived from the TimeSpan. Other components of the field-specifier are optional, and influence the formatting of field-name.
required-term: field-specifier | literal
field-specifier: [width-specifier] field-name[unit-specifier][fraction][label-specifier]
The following term specifies the field width. For example, '2s' shows the number of seconds padded with leading zeros if necessary to obtain a width of 2 digits.
width-specifier: positive-integer
The following term inserts a number derived from the TimeSpan.
field-name: 'y' | 'n' | 'w' | 'd' | 'h' | 'm' | 's' | 'f' | 'u'
The field names are interpreted as follows:
- y: Years. Defined as 365-day intervals. If you want to use a different definition of years, then use unit-specifier. For example 'y=365.25d' might be used to display the number of 365 1/4 -day years.
- n: Months. Defined as 30-day intervals. If you want to use a different definition of months, then use unit-specifier.
- w: Weeks. Defined as 7-day intervals. If you want to use a different definition of weeks then use unit-specifier.
- d: Days.
- h: Hours.
- m: Minutes.
- s: Seconds.
- f: Milliseconds.
-
u: An alias for the native units that are used in the repository to represent property values for this property.
- The native units may be days, hours, minutes, etc.
- The alias may also be a custom value that doesn't correspond to one of the recognized named units. In this case, the label-specifier, if provided, is ignored.
- You can add your own label as a literal string, but it won't be localized.
Examples
Format String |
Comment |
Actual Value |
Display Value |
---|---|---|---|
u.0:2 |
The examples below assume the storage unit in the repository is 1.0 hours |
26.505556 4.500000 2.000000 0.250000 |
26.51 4.5 2 0.25 |
[d.]2h:2m:2s.0:7 |
The format used by System.TimeSpan.ToString() under .NET. Oracle uses a similar format for their time spans (except that the period after the optional day component is replaced by a space) |
26.505556 4.500000 2.000000 0.250000 |
1.02:30:20.0016 04:30:00 02:00:00 00:15:00 |
[[d+, ]h+, ]m+[, s.0:2+] |
A verbose display format, displaying minutes and component labels. |
26.505556 4.500000 2.000000 0.250000 |
1 day, 2 hours, 30 minutes, 20.002 seconds 4 hours, 30 minutes 2 hours, 0 minutes 15 minutes |
d=8h+ |
Displays 8-hour man-days |
26.505556 4.500000 2.000000 0.250000 |
3 days 1 day 0 days 0 days |