Skip to content

Commit 56a4122

Browse files
authored
chore(core): clarify support for ISO duration (#29576)
Closes #29572. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8df2823 commit 56a4122

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/aws-cdk-lib/core/lib/duration.ts

+7
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ export class Duration {
6262
/**
6363
* Parse a period formatted according to the ISO 8601 standard
6464
*
65+
* Days are the largest ISO duration supported, i.e.,
66+
* weeks, months, and years are not supported.
67+
*
68+
* @example
69+
* // This represents 1 day, 2 hours, 3 minutes, 4 seconds, and 567 milliseconds.
70+
* 'P1DT2H3M4.567S'
71+
*
6572
* @see https://www.iso.org/standard/70907.html
6673
* @param duration an ISO-formatted duration to be parsed.
6774
* @returns the parsed `Duration`.

0 commit comments

Comments
 (0)