Skip to content

Commit 49bcdfb

Browse files
authored
Add guidelines for durations
1 parent 0ab68b1 commit 49bcdfb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

azure/Guidelines.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
| Date | Notes |
55
| ----------- | -------------------------------------------------------------- |
6+
| 2022-Mar-29 | Add guidelines about using durations |
67
| 2022-Mar-25 | Update guideline for date values in headers to follow RFC 7231 |
78
| 2022-Feb-01 | Updated error guidance |
89
| 2021-Sep-11 | Add long-running operations guidance |
@@ -374,6 +375,10 @@ Services, and the clients that access them, may be written in multiple languages
374375

375376
:white_check_mark: **DO** use [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) for date/time.
376377

378+
:white_check_mark: **DO** use a fixed time interval when using durations e.g., `ttlSeconds`. The unit of time should be part of the name, but must at least be documented in the property description.
379+
380+
:heavy_check_mark: **YOU MAY** use [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) durations only when users must be able to specify a time intervals that may change from month to month or year to year e.g., "P1Y" represents 366 days on a leap year.
381+
377382
:white_check_mark: **DO** use [RFC4122](https://datatracker.ietf.org/doc/html/rfc4122) for UUIDs.
378383

379384
:heavy_check_mark: **YOU MAY** use JSON objects to group sub-fields together.

0 commit comments

Comments
 (0)