DurationToDescription Method

Convert the duration instance to a text description

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public string ToDescription()

Return Value

String
Returns the duration description.

Remarks

The conversion to string breaks the duration down by largest to smallest unit (years down to seconds). As such, the string returned may not match the string it was parsed from if a unit in the input string exceeds a unit of time used when converting it back to a string (i.e. PT24H will be returned as 1 day, P7W will be returned as 1 month, 2 weeks, 5 days if a month is defined as 30 days). The overloaded version can be used to convert to a string with a maximum unit of time represented.

See Also