tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

formatRange-original-skeleton.js (551B)


      1 // |reftest| skip-if(!this.hasOwnProperty("Intl"))
      2 
      3 // Test that the interval formatting uses the original skeleton, not the skeleton
      4 // derived from the resolved pattern.
      5 {
      6  let dtf = new Intl.DateTimeFormat("zh-Hans-CN", {
      7    formatMatcher: "best fit",
      8    month: "narrow",
      9    day: "2-digit",
     10    timeZone: "UTC"
     11  });
     12 
     13  assertEq(dtf.format(Date.UTC(2016, 7, 1)), "8月01日");
     14  assertEq(dtf.formatRange(Date.UTC(2016, 7, 1), Date.UTC(2016, 7, 2)), "8月1日至2日");
     15 }
     16 
     17 if (typeof reportCompare === "function")
     18    reportCompare(0, 0, "ok");