Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): clarify support for ISO duration #29576

Merged
merged 4 commits into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/aws-cdk-lib/core/lib/duration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ export class Duration {
/**
* Parse a period formatted according to the ISO 8601 standard
*
* Days are the largest ISO duration supported, i.e.,
* weeks, months, and years are not supported.
*
* @example
* // This represents 1 day, 2 hours, 3 minutes, 4 seconds, and 567 milliseconds.
* 'P1DT2H3M4.567S'
*
msambol marked this conversation as resolved.
Show resolved Hide resolved
* @see https://www.iso.org/standard/70907.html
* @param duration an ISO-formatted duration to be parsed.
* @returns the parsed `Duration`.
Expand Down