Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Detail spec out AvailableTimeZones to be sorted and canonicalized #26

Closed
FrankYFTang opened this issue May 19, 2021 · 1 comment
Closed

Comments

@FrankYFTang
Copy link
Collaborator

Split item 5 of @anba review of #22 here so we can track the issue independently.

5. AvailableTimeZones ( region )
"If the region is undefined, then it return all the names." could be misread that it doesn't require the result to contain only unique, canonical, and case-regularised names.
We could provide a complete algorithm to make this case more clear:

Let names be a List of all Zone and Link names of the IANA Time Zone Database.
Let result be a new empty List.
For each element name of names, do
Assert: ! IsValidTimeZoneName(name) is true.
Let canonical be ! CanonicalizeTimeZoneName(name).
Append canonical to the end of result.
Sort result in simple lexicographic order.
Return result with all duplicate elements removed.
@FrankYFTang
Copy link
Collaborator Author

closed by #29

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant