Given an ISO 8601 compliant narrow character duration string, this method converts it into the number of seconds it represents.
https://en.wikipedia.org/wiki/ISO_8601 Durations "..P[n]Y[n]M[n]DT[n]H[n]M[n]S or P[n]W as shown to the right. In these representations, the [n] is replaced by the value for each of the date and time elements that follow the [n]."
Durations are inaccurate since they assume 30.4375 days per month and 365.25 days per year. However days can be used instead of months or years when using the duration string. Fields that are zero can be empty (e.g., PT3H is legal).
- Parameters
-
pDuration | [ in ] A pointer to a NULL terminated P6R::P6WCHAR containing an ISO 8601 compliant duration string. |
durLength | [ in ] The length of the string pointed to by pDuration |
pReturnSeconds | [ out ] The number of seconds represented by the ISO 8601 duration string |
- Returns
Success | P6R::eOk | |
Failure | The values pointed to by the pOutTime and pDeltaFromGMT arguments are unchanged. |
P6R::eNotInitialized | The initialize() method was not called successfully before calling this method. |
eBadDurationType | The string in pDuration is not an IS0 8601 compliant duration string. |
P6R::eInvalidArg | pDuration or pReturnSeconds was NULL, or durLength was zero |