You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the mentioned iso8601 - Duration a Duration of 1 day can be expressed as:
P1D
PT24H
PT1440M
PT86400S
The current TimeDelta Display implementation always returns the longer format in seconds, which is a practical solution. However, it can be challenging to read for more complex PT values.
For example, a valid 10-day, 2-hour, and 30-minute TimeDelta gets translated to PT873000S instead of P10DT2H30M.
Would you consider adding what has been referred to as "nominal" components in future releases?
The text was updated successfully, but these errors were encountered:
The different strings you write to express one day are not meant to work identical by ISO 8601.
In P1D one day can be less or more than 24 hours. That may be the case if the duration includes a day with a daylight saving time change. In the same way PT1440M is intended to work slightly different from PT86400S if there is a leap second.
#1282 is our plan to add a CalendarDuration type that can work correctly with a duration that is build up out of multiple components (months, days, minutes, seconds and nanoseconds).
Recently in #1328 we changed TimeDelta/Duration to format its value with only seconds. That is the only correct way to format the value according to ISO 8601. Using larger components would change the meaning of the formatted string, and work incorrectly when read back with more correct/advanced implementations such as CalendarDuration.
As per the mentioned iso8601 - Duration a Duration of 1 day can be expressed as:
The current TimeDelta Display implementation always returns the longer format in seconds, which is a practical solution. However, it can be challenging to read for more complex PT values.
For example, a valid 10-day, 2-hour, and 30-minute TimeDelta gets translated to
PT873000S
instead ofP10DT2H30M
.Would you consider adding what has been referred to as "nominal" components in future releases?
The text was updated successfully, but these errors were encountered: