Skip to content

Commit ec1d62d

Browse files
authored
Merge pull request #340 from heaths/patch-1
Add guidelines for durations
2 parents 0ab68b1 + c440933 commit ec1d62d

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 to express durations e.g., milliseconds, seconds, minutes, days, etc., and include the time unit in the property name e.g., `backupTimeInMinutes` or `ttlSeconds`.
379+
380+
:heavy_check_mark: **YOU MAY** use [RFC3339 time intervals](https://wikipedia.org/wiki/ISO_8601#Durations) only when users must be able to specify a time interval that may change from month to month or year to year e.g., "P3M" represents 3 months no matter how many days between the start and end dates, or "P1Y" represents 366 days on a leap year. The value must be round-trippable.
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)