<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 12/14/2011 10:17 AM, Nebojša Ćirić wrote:
    <blockquote
cite="mid:CADdKALNXtkaAOAUvK-eNMJA_3iyJ9=KSFAzwsDCDbwx6+jyUTw@mail.gmail.com"
      type="cite">Item we discussed the least is the global default
      locale. I would propose __Globalization.localeList property as a
      way of setting/reading default locale list. For example:
      <div><br>
      </div>
      <div>var intl = Object.system.load('@globalization');</div>
      <div><b>intl.localeList</b> = new intl.LocaleList(['sr', 'fr',
        'de']);</div>
      <div><br>
      </div>
      <div>Date.now().toLocaleString(options);</div>
    </blockquote>
    I think you mean:<br>
    <br>
        (new Date()).toLocaleString(options);<br>
    <br>
    Date.now() returns a number, not a Date object. <br>
    <br>
    Are you saying that intl.localeList would be initialized prior to
    being loaded via Object.system.load("@globalization")? And then a
    developer could override that property to create a new global
    localList?<br>
    <br>
    FWIW: One issue with using toLocaleString() for formatting is that
    it already exists, so there isn't a straightforward way to feature
    detect that it's the new implementation instead of the old
    implementation.<br>
    <blockquote
cite="mid:CADdKALNXtkaAOAUvK-eNMJA_3iyJ9=KSFAzwsDCDbwx6+jyUTw@mail.gmail.com"
      type="cite">
      <div><br>
      </div>
      <div>or </div>
      <div><br>
      </div>
      <div>var dtf = new intl.DateTimeFormat(options);</div>
      <div>dtf.format(new Date());</div>
      <div><br>
      </div>
      <div>Both toLocaleString call and DateTimeFormat constructor would
        use intl.localeList as default locale list with the current
        value.</div>
      <div><br>
      </div>
      <div>There are 3 ways of picking which locale list to use:</div>
      <div><br>
      </div>
      <div>1. DateTimeFormat has a valid localeList parameter. That
        parameter gets used - globals and defaults are ignored.</div>
      <div>2. DateTimeFormat doesn't have localeList parameter
        specified:</div>
      <div>  2a. Use intl.localeList if defined.</div>
      <div>  2b. Use implementation specific default locale if
        intl.localeList was not defined.</div>
      <div>3. Ultimate fallback is implementation specific default
        locale.<br>
        <div class="gmail_quote"><br>
        </div>
        <div class="gmail_quote">
          What do you think?</div>
      </div>
    </blockquote>
    <br>
    Part of the reason I was proposing the change to a single Locale
    object is because, with a single authority such as this, any script
    on a page would be capable of overriding the default locale and,
    therefore, changing the behavior of everything on the page. That
    seems like a very problematic behavior.<br>
    <br>
    -N<br>
    <blockquote
cite="mid:CADdKALNXtkaAOAUvK-eNMJA_3iyJ9=KSFAzwsDCDbwx6+jyUTw@mail.gmail.com"
      type="cite">
      <div>
        <div class="gmail_quote"><br>
        </div>
        <div class="gmail_quote">14. децембар 2011. 09.47, Nebojša Ćirić
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:cira@google.com">cira@google.com</a>></span>
          је написао/ла:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a
            feeling that the main group prefers module approach
            (Object.system.load('@globalization') kind) over a new
            global object given the future direction of the standard.
            Please correct me if I am wrong.
            <div>
              <br>
            </div>
            <div>Global Locale approach could be implemented with thin
              wrapper over our object proposal (very similar to tie in
              to the built in toLocaleString method). Should we make
              that wrapper part of the standard or not is a different
              question (maybe as a v2.0 of the standard?).</div>
            <div><br>
            </div>
            <div>I'll start implementing the latest proposal in v8 soon.
              If anybody has any major issues with the current state
              please yell.<br>
              <br>
              <div class="gmail_quote">09. децембар 2011. 14.51,
                Nicholas C. Zakas <span dir="ltr"><<a
                    moz-do-not-send="true"
                    href="mailto:standards@nczconsulting.com"
                    target="_blank">standards@nczconsulting.com</a>></span>
                је написао/ла:
                <div>
                  <div class="h5"><br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000"> I'm still
                        holding out hope for a Locale object that
                        handles everything. :) Other than that, I think
                        you have covered everything else.<br>
                        <br>
                        -N
                        <div>
                          <div><br>
                            <br>
                            On 12/8/2011 12:55 PM, Nebojša Ćirić wrote:
                            <blockquote type="cite">6. Ability to set
                              global locale list.<br>
                              <br>
                              <div class="gmail_quote">08. децембар
                                2011. 10.25, Nebojša Ćirić <span
                                  dir="ltr"><<a
                                    moz-do-not-send="true"
                                    href="mailto:cira@google.com"
                                    target="_blank">cira@google.com</a>></span>
                                је написао/ла:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex"> There are
                                  couple of threads going on and I
                                  wanted to wrap up current state before
                                  the holidays...
                                  <div><br>
                                  </div>
                                  <div>API:</div>
                                  <div> 1. Use built in toLocaleString
                                    family of methods in simple,
                                    functional case*</div>
                                  <div> 2. Use Globalization API as
                                    proposed (with some tweaks) for
                                    complex scenarios**</div>
                                  <div><br>
                                  </div>
                                  <div>* - <a moz-do-not-send="true"
href="http://wiki.ecmascript.org/doku.php?id=strawman:globalization-integration"
                                      target="_blank">http://wiki.ecmascript.org/doku.php?id=strawman:globalization-integration</a></div>
                                  <div>** - <a moz-do-not-send="true"
href="http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts"
                                      target="_blank">http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts</a></div>
                                  <div><br>
                                  </div>
                                  <div>Proposed changes to the original
                                    API:</div>
                                  <div> 1. Remove global namespace <b>Globalization</b>
                                    (give an internal name to remove
                                    chance of conflicts, i.e.
                                    __Globalization).</div>
                                  <div><br>
                                  </div>
                                  <div> 2. Use module loading logic
                                    instead (we need a way to do a
                                    blocking load of built-in library -
                                    <b>Object.system.load</b>() is async
                                    at the moment)<br clear="all">
                                    <div>  2a. What happens with
                                      toLocaleString methods when user
                                      doesn't load @globalization
                                      module?</div>
                                    <div><br>
                                    </div>
                                    <div> 3. Accept either a String
                                      (LDML) or an option Object as a
                                      format parameter in formatters.
                                      Simplifies the simple use case and
                                      loading resources from files.</div>
                                    <div>  3a. In addition to
                                      DateTimeFormat({year:'long'}) one
                                      can DateTimeFormat("yyyy").</div>
                                    <div><br>
                                    </div>
                                    <div> 4. Come up with the name of
                                      the built-in library - <b>module
                                        intl import '@globalization'</b>
                                      doesn't sound so terrible to me as
                                      one time operation.</div>
                                    <div><br>
                                    </div>
                                    <div> 5. Move locale list parameter
                                      into the options. I think that
                                      clashes with item 3. where options
                                      are being replaced with the string
                                      in some cases. Keeping locales
                                      separate removes the conflict.</div>
                                    <div>   5a. Instead of
                                      DateTimeFormat(locList, options)
                                      have DateTimeFormat(options),
                                      where options hold locale info.</div>
                                    <div><br>
                                    </div>
                                    <div>Did I miss anything?</div>
                                    <span><font color="#888888">
                                        <div><br>
                                        </div>
                                        -- <br>
                                        Nebojša Ćirić<br>
                                      </font></span></div>
                                </blockquote>
                              </div>
                              <br>
                              <br clear="all">
                              <div><br>
                              </div>
                              -- <br>
                              Nebojša Ćirić<br>
                            </blockquote>
                            <br>
                            <br>
                          </div>
                        </div>
                        <span><font color="#888888">
                            <pre cols="72">-- 
___________________________
Nicholas C. Zakas
<a moz-do-not-send="true" href="http://www.nczonline.net" target="_blank">http://www.nczonline.net</a></pre>
                          </font></span></div>
                    </blockquote>
                  </div>
                </div>
              </div>
              <span class="HOEnZb"><font color="#888888"><br>
                  <br clear="all">
                  <div><br>
                  </div>
                  -- <br>
                  Nebojša Ćirić<br>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        Nebojša Ćirić<br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
___________________________
Nicholas C. Zakas
<a class="moz-txt-link-freetext" href="http://www.nczonline.net">http://www.nczonline.net</a></pre>
  </body>
</html>