<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Intl

      Intl.Collator 排序器的構造函數,可以支持對語言敏感的字符串比較

      let list = [1, 2, 3, 10, 11, 12, 20, 21, 22, 100, 102, 103, 200, 201, 202, 130, 220];
      
      // numeric: 是否按照數值進行比較
      let collator = Intl.Collator(undefined, { numeric: true });
      
      list.sort(); // [ 1, 10, 100, 102, 103, 11, 12, 130, 2, 20, 200, 201, 202, 21, 22, 220, 3 ]
      list.sort(collator.compare); // [ 1, 2, 3, 10, 11, 12, 20, 21, 22, 100, 102, 103, 130, 200, 201, 202, 220 ]
      
      let namelist = [
        '陳坤',
        '鄧超',
        '杜淳',
        '馮紹峰',
        '韓庚',
        '胡歌',
        '黃曉明',
        '賈乃亮',
        '李晨',
        '李易峰',
        '鹿晗',
        '井柏然',
        '劉燁',
        '陸毅',
        '孫紅雷'
      ];
      namelist.sort(); // [ '井柏然', '馮紹峰', '劉燁', '孫紅雷', '李易峰', '李晨', '杜淳', '胡歌', '賈乃亮', '鄧超', '陸毅', '陳坤', '韓庚', '鹿晗', '黃曉明' ]
      namelist.sort(new Intl.Collator('zh').compare); // [ '陳坤', '鄧超', '杜淳', '馮紹峰', '韓庚', '胡歌', '黃曉明', '賈乃亮', '井柏然', '李晨', '李易峰', '劉燁', '陸毅', '鹿晗', '孫紅雷' ]
      

      Intl.DateTimeFormat 在特定的語言環境下格式化日期和時間

      const format = new Intl.DateTimeFormat('zh-Hans', {
        year: 'numeric',
        month: '2-digit',
        // weekday: 'long',
        day: '2-digit',
        hour: '2-digit',
        minute: '2-digit',
        second: '2-digit',
        hour12: false
      })
      
      // 創建一個新的 DateTimeFormat 實例
      const format2 = new Intl.DateTimeFormat('zh-CN', {
        year: 'numeric',
        month: 'long',
        day: 'numeric',
        hour: 'numeric',
        minute: 'numeric',
        second: 'numeric'
      });
      
      // 格式化當前日期和時間
      format.format(new Date()); // '2024/05/25 17:06:02'
      format2.format(new Date()); // '2024年5月25日 17:06:24'
      

      Intl.ListFormat 排序器的構造函數,可以支持對語言敏感的字符串比較

      // 讓對語言敏感的列表進行格式化
      var vehicles = ['Motorcycle', 'Bus', 'Car'];
      
      var formatter = new Intl.ListFormat('en', { style: 'long', type: 'conjunction' });
      console.log(formatter.format(vehicles)); // 'Motorcycle, Bus, and Car'
      

      Intl.NumberFormat 根據不同語言環境最數值字符串進行不同的呈現處理

      Intl.NumberFormat(undefined, {
        minimumFractionDigits: 10
      }).format(123456789056.123); // '123,456,789,056.1230000000'
      
      new Intl.NumberFormat('zh-Hans', {
        style: 'currency',
        currency: 'CNY',
        currencyDisplay: 'name'
      }).format(12345.6789); // '12,345.68人民幣'
      
      '星期' + new Intl.NumberFormat('zh-Hans-CN-u-nu-hanidec').format(new Date().getDay()); // '星期六'
      
      new Intl.NumberFormat('zh-Hans-CN-u-nu-hanidec', {
        style: 'currency',
        currency: 'CNY',
        currencyDisplay: 'name',
        useGrouping: false
      }).format(1234); // '一二三四.〇〇人民幣'
      

      Intl.PluralRules 啟用多個敏感格式和多個語言規則的對象

      new Intl.PluralRules('ar-EG').select(0);
      // → 'zero'
      new Intl.PluralRules('ar-EG').select(1);
      // → 'one'
      new Intl.PluralRules('ar-EG').select(2);
      // → 'two'
      new Intl.PluralRules('ar-EG').select(6);
      // → 'few'
      new Intl.PluralRules('ar-EG').select(18);
      // → 'many'
      

      Intl.RelativeTimeFormat 相對時間的格式化

      let rtf = new Intl.RelativeTimeFormat('zh', {
        numeric: 'auto'
      });
      // -1表示前一天
      rtf.format(-1, 'day'); // '昨天'
      rtf.format(1, 'day'); // '明天'
      rtf.format(-365, 'day'); // '365天前'
      

      Intl.getCanonicalLocales 規范語言環境名稱的數組。重復項將被忽略,元素將被驗證為結構上有效的語言標記

      Intl.getCanonicalLocales('zh-hans');
      // 結果是:["zh-Hans"]
      Intl.getCanonicalLocales('zh');
      // 結果是:["zh"]
      Intl.getCanonicalLocales('zh-cmn-Hans-CN');
      // 結果是:["cmn-Hans-CN"]
      Intl.getCanonicalLocales('zh-cn');
      // 結果是:["zh-CN"]
      Intl.getCanonicalLocales('yue-hk');
      // 結果是:["yue-HK"]
      Intl.getCanonicalLocales('zh-some');
      // 結果是:["zh-Some"]
      
      posted @ 2024-05-25 23:25  _clai  閱讀(55)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 最新亚洲av日韩av二区| 爱性久久久久久久久| 男人的天堂av社区在线| 国产亚洲精品在av| 国产成人午夜福利在线观看| 国产亚洲欧美日韩俺去了| 色窝窝免费一区二区三区| 亚洲综合网国产精品一区| 日本欧美大码a在线观看| 中文区中文字幕免费看| 开心婷婷五月激情综合社区 | 欧美乱码伦视频免费| 98精品全国免费观看视频| 少妇人妻偷人精品免费| 亚洲大尺度一区二区三区| 国产特级毛片aaaaaa毛片| 国产精品大片中文字幕| 久热色视频精品在线观看| 狠狠躁夜夜躁无码中文字幕| 国产午夜精品久久精品电影 | 国产成人精品高清不卡在线| 一区二区亚洲人妻精品| 你懂的视频在线一区二区| 性欧美暴力猛交69hd| free性开放小少妇| 国产一区二区三区不卡自拍| 97久久精品人人做人人爽| 在线 欧美 中文 亚洲 精品| 激情亚洲内射一区二区三区 | 东京热人妻无码一区二区AV| 亚洲精品一区二区动漫| 国产无遮挡真人免费视频| 亚洲亚洲人成综合网络| 欧洲美熟女乱又伦免费视频| 日韩av片无码一区二区不卡| 亚洲欧美牲交| japan黑人极大黑炮| 猫咪AV成人永久网站在线观看| 97av麻豆蜜桃一区二区| 亚洲人成人影院在线观看| 国产av剧情md精品麻豆|