Duration Class |
Namespace: Apptus.ESales.Connector.Time
public class Duration
The Duration type exposes the following members.
Name | Description | |
---|---|---|
Precision |
The finest unit with a specified amount for this duration. For instance,
the duration PT1M has minute precision, while PT1M0S has second precision (even
if the number of seconds specified is zero).
|
Name | Description | |
---|---|---|
Add |
Creates a third duration being the sum of this duration and the argument duration.
| |
Amount |
Returns the amount of a certain unit. This is not a total amount, but instead the
amount specified for the specified field.
| |
Back |
Returns a date time that denotes the point in time at the length of this
duration back in time from the specified date time.
| |
Create |
Creates a duration with a certain amount of a specified unit.
| |
Equals | True if the argument is a duration with the same or equivalent specification. Note that P1W equals P7D by definition, whereas e.g. P1M does not equal P30D since months are not 30 days in general. Less obvious, P1D is not equal to P24H in general. Years are normalized to months, weeks to days and hours and minutes to seconds. After normalization, both durations are compared component by component. Iff all components match, this method returns true. | |
Finalize | (Inherited from Object.) | |
Forward |
Returns a date time that denotes the point in time at the length of this
duration forward in time from the specified date time.
| |
FromTimeSpan |
Creates a duration from a TimeSpan object. Milliseconds are truncated to the seconds.
| |
GetHashCode | (Overrides ObjectGetHashCode.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
Parse |
Parses a duration.
| |
ToString | (Overrides ObjectToString.) |