Coder Social home page Coder Social logo

Comments (5)

FrankYFTang avatar FrankYFTang commented on June 22, 2024

Currently it is defined as "of those in common use in region."
I am not sure do we need to be more specific than that. Do you have any specific suggestion of how to specify?

from proposal-intl-locale-info.

anba avatar anba commented on June 22, 2024

The current specification requires that the array returned from TimeZonesOfLocale has at least one element. Should implementations just make up the most commonly used time zone when no actual data is present?

For example here's what V8 returns for the specific cases mentioned above:

d8> new Intl.Locale("und-ZX").timeZones
[]
d8> new Intl.Locale("und-ZZ").timeZones
[]
d8> new Intl.Locale("und-019").timeZones
[]

This is clearly not compliant to the current specification, because the returned array has zero elements, but at least one element is required to be returned.

from proposal-intl-locale-info.

FrankYFTang avatar FrankYFTang commented on June 22, 2024

hum... make sense
should we change
"Let list be a List of 1 or more unique time zone identifiers,"
to
"Let list be a List of 0 or more unique time zone identifiers," ?

from proposal-intl-locale-info.

anba avatar anba commented on June 22, 2024

Let list be a List of 0 or more unique time zone identifiers, [...], of those in common use in region.

"0 or more" reads a bit strange to me when we want to express the list can have any number of elements.

What about something along the lines of:

Let list be a List of unique time zone identifiers, [...], of those in common use in region. If no time zones are commonly used in region, let list be a new empty List.

This way we explicitly say under which conditions the list can be empty.

from proposal-intl-locale-info.

ByteEater-pl avatar ByteEater-pl commented on June 22, 2024

Should implementations just make up the most commonly used time zone when no actual data is present?

How about GMT?

from proposal-intl-locale-info.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.