Skip to content

Commit

Permalink
Update docs/style-guide.md
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Gibson <[email protected]>
  • Loading branch information
ben-allen and gibson042 authored May 21, 2024
1 parent 97ba211 commit 3895c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ This section concerns the order in which containers store elements.

:star2: *ECMA-402 spec must provide a deterministic order for the contents of all containers. This order should be lexicographic except in cases wherein there is a clearly preferable semantic ordering. :star2:*

For example, an array holding the time zone identifiers `Asia/Tokyo`, `Asia/Ho_Chi_Minh`, and `Asia/Dubai` should use the order `["Asia/Dubai", "Asia/Ho_Chi_Minh", "Asia/Tokyo"]`
For example, an array holding the time zone identifiers "Asia/Tokyo", "Asia/Ho_Chi_Minh", and "Asia/Dubai" should use the order `["Asia/Dubai", "Asia/Ho_Chi_Minh", "Asia/Tokyo"]`

For an example of when *not* to use lexicographic order, consider an array holding calendar time scale units. This array could be ordered by descending magnitude as `["years", "months", "weeks", "days"]` or its reverse ascending magnitude as `["days", "weeks", "months", "years"]`, but should not use the lexicographic `["days", "months", "weeks", "years"]` order.

Expand Down

0 comments on commit 3895c86

Please sign in to comment.