@formatjs/intl-datetimeformat 6.13.0 → 6.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/add-all-tz.js +212 -212
- package/add-golden-tz.js +134 -134
- package/lib/polyfill-force.js +12 -2
- package/lib/src/data/all-tz.js +212 -212
- package/lib/src/data/links.d.ts +12 -0
- package/lib/src/data/links.js +12 -0
- package/lib/test262-main.js +171 -341
- package/locale-data/af-NA.js +6 -24
- package/locale-data/af.js +6 -24
- package/locale-data/am.js +11 -29
- package/locale-data/ar-AE.js +6 -24
- package/locale-data/ar-BH.js +6 -24
- package/locale-data/ar-DJ.js +6 -24
- package/locale-data/ar-DZ.js +6 -24
- package/locale-data/ar-EG.js +6 -24
- package/locale-data/ar-EH.js +6 -24
- package/locale-data/ar-ER.js +6 -24
- package/locale-data/ar-IL.js +6 -24
- package/locale-data/ar-IQ.js +6 -24
- package/locale-data/ar-JO.js +6 -24
- package/locale-data/ar-KM.js +6 -24
- package/locale-data/ar-KW.js +6 -24
- package/locale-data/ar-LB.js +6 -24
- package/locale-data/ar-LY.js +6 -24
- package/locale-data/ar-MA.js +6 -24
- package/locale-data/ar-MR.js +6 -24
- package/locale-data/ar-OM.js +6 -24
- package/locale-data/ar-PS.js +6 -24
- package/locale-data/ar-QA.js +6 -24
- package/locale-data/ar-SA.js +6 -24
- package/locale-data/ar-SD.js +6 -24
- package/locale-data/ar-SO.js +6 -24
- package/locale-data/ar-SS.js +6 -24
- package/locale-data/ar-SY.js +6 -24
- package/locale-data/ar-TD.js +6 -24
- package/locale-data/ar-TN.js +6 -24
- package/locale-data/ar-YE.js +6 -24
- package/locale-data/ar.js +6 -24
- package/locale-data/as.js +6 -24
- package/locale-data/ast.js +6 -28
- package/locale-data/az-Latn.js +6 -24
- package/locale-data/az.js +6 -24
- package/locale-data/be-tarask.js +6 -24
- package/locale-data/be.js +6 -24
- package/locale-data/bg.js +80 -98
- package/locale-data/bn-IN.js +16 -34
- package/locale-data/bn.js +15 -33
- package/locale-data/br.js +6 -24
- package/locale-data/brx.js +6 -24
- package/locale-data/bs-Cyrl.js +6 -24
- package/locale-data/bs-Latn.js +47 -65
- package/locale-data/bs.js +47 -65
- package/locale-data/ca-AD.js +314 -332
- package/locale-data/ca-ES-valencia.js +314 -332
- package/locale-data/ca-FR.js +314 -332
- package/locale-data/ca-IT.js +314 -332
- package/locale-data/ca.js +314 -332
- package/locale-data/ccp-IN.js +6 -24
- package/locale-data/ccp.js +6 -24
- package/locale-data/ce.js +6 -24
- package/locale-data/ceb.js +8 -26
- package/locale-data/chr.js +6 -28
- package/locale-data/ckb-IR.js +2 -2
- package/locale-data/ckb.js +2 -2
- package/locale-data/cs.js +16 -38
- package/locale-data/cy.js +6 -24
- package/locale-data/da-GL.js +8 -26
- package/locale-data/da.js +8 -26
- package/locale-data/de-AT.js +27 -45
- package/locale-data/de-BE.js +27 -45
- package/locale-data/de-CH.js +27 -45
- package/locale-data/de-IT.js +27 -45
- package/locale-data/de-LI.js +27 -45
- package/locale-data/de-LU.js +27 -45
- package/locale-data/de.js +27 -45
- package/locale-data/doi.js +0 -6
- package/locale-data/dsb.js +6 -24
- package/locale-data/dz.js +6 -12
- package/locale-data/ee-TG.js +6 -24
- package/locale-data/ee.js +6 -24
- package/locale-data/el-CY.js +6 -24
- package/locale-data/el.js +6 -24
- package/locale-data/en-001.js +6 -24
- package/locale-data/en-150.js +6 -24
- package/locale-data/en-AE.js +6 -24
- package/locale-data/en-AG.js +6 -24
- package/locale-data/en-AI.js +6 -24
- package/locale-data/en-AS.js +6 -28
- package/locale-data/en-AT.js +6 -24
- package/locale-data/en-AU.js +171 -58
- package/locale-data/en-BB.js +6 -24
- package/locale-data/en-BE.js +6 -24
- package/locale-data/en-BI.js +6 -28
- package/locale-data/en-BM.js +6 -24
- package/locale-data/en-BS.js +6 -24
- package/locale-data/en-BW.js +6 -24
- package/locale-data/en-BZ.js +6 -24
- package/locale-data/en-CA.js +30 -60
- package/locale-data/en-CC.js +6 -24
- package/locale-data/en-CH.js +6 -24
- package/locale-data/en-CK.js +6 -24
- package/locale-data/en-CM.js +6 -24
- package/locale-data/en-CX.js +6 -24
- package/locale-data/en-CY.js +6 -24
- package/locale-data/en-DE.js +6 -24
- package/locale-data/en-DG.js +6 -24
- package/locale-data/en-DK.js +6 -24
- package/locale-data/en-DM.js +6 -24
- package/locale-data/en-ER.js +6 -24
- package/locale-data/en-FI.js +6 -24
- package/locale-data/en-FJ.js +6 -24
- package/locale-data/en-FK.js +6 -24
- package/locale-data/en-FM.js +6 -24
- package/locale-data/en-GB.js +187 -82
- package/locale-data/en-GD.js +6 -24
- package/locale-data/en-GG.js +6 -24
- package/locale-data/en-GH.js +6 -24
- package/locale-data/en-GI.js +6 -24
- package/locale-data/en-GM.js +6 -24
- package/locale-data/en-GU.js +6 -28
- package/locale-data/en-GY.js +6 -24
- package/locale-data/en-HK.js +6 -24
- package/locale-data/en-IE.js +6 -24
- package/locale-data/en-IL.js +6 -24
- package/locale-data/en-IM.js +6 -24
- package/locale-data/en-IN.js +190 -73
- package/locale-data/en-IO.js +6 -24
- package/locale-data/en-JE.js +6 -24
- package/locale-data/en-JM.js +6 -24
- package/locale-data/en-KE.js +6 -24
- package/locale-data/en-KI.js +6 -24
- package/locale-data/en-KN.js +6 -24
- package/locale-data/en-KY.js +6 -24
- package/locale-data/en-LC.js +6 -24
- package/locale-data/en-LR.js +6 -24
- package/locale-data/en-LS.js +6 -24
- package/locale-data/en-MG.js +6 -24
- package/locale-data/en-MH.js +6 -24
- package/locale-data/en-MO.js +6 -24
- package/locale-data/en-MP.js +6 -24
- package/locale-data/en-MS.js +6 -24
- package/locale-data/en-MT.js +6 -24
- package/locale-data/en-MU.js +6 -24
- package/locale-data/en-MW.js +6 -24
- package/locale-data/en-MY.js +6 -24
- package/locale-data/en-NA.js +6 -24
- package/locale-data/en-NF.js +6 -24
- package/locale-data/en-NG.js +6 -24
- package/locale-data/en-NL.js +6 -24
- package/locale-data/en-NR.js +6 -24
- package/locale-data/en-NU.js +6 -24
- package/locale-data/en-NZ.js +54 -72
- package/locale-data/en-PG.js +6 -24
- package/locale-data/en-PH.js +6 -28
- package/locale-data/en-PK.js +6 -24
- package/locale-data/en-PN.js +6 -24
- package/locale-data/en-PR.js +6 -28
- package/locale-data/en-PW.js +6 -24
- package/locale-data/en-RW.js +6 -24
- package/locale-data/en-SB.js +6 -24
- package/locale-data/en-SC.js +6 -24
- package/locale-data/en-SD.js +6 -24
- package/locale-data/en-SE.js +6 -24
- package/locale-data/en-SG.js +6 -24
- package/locale-data/en-SH.js +6 -24
- package/locale-data/en-SI.js +6 -24
- package/locale-data/en-SL.js +6 -24
- package/locale-data/en-SS.js +6 -24
- package/locale-data/en-SX.js +6 -24
- package/locale-data/en-SZ.js +6 -24
- package/locale-data/en-TC.js +6 -24
- package/locale-data/en-TK.js +6 -24
- package/locale-data/en-TO.js +6 -24
- package/locale-data/en-TT.js +6 -24
- package/locale-data/en-TV.js +6 -24
- package/locale-data/en-TZ.js +6 -24
- package/locale-data/en-UG.js +6 -24
- package/locale-data/en-UM.js +6 -28
- package/locale-data/en-VC.js +6 -24
- package/locale-data/en-VG.js +6 -24
- package/locale-data/en-VI.js +6 -28
- package/locale-data/en-VU.js +6 -24
- package/locale-data/en-WS.js +6 -24
- package/locale-data/en-ZA.js +6 -24
- package/locale-data/en-ZM.js +6 -24
- package/locale-data/en-ZW.js +6 -24
- package/locale-data/en.js +6 -28
- package/locale-data/eo.js +175 -97
- package/locale-data/es-419.js +345 -361
- package/locale-data/es-AR.js +341 -359
- package/locale-data/es-BO.js +341 -359
- package/locale-data/es-BR.js +229 -247
- package/locale-data/es-BZ.js +229 -247
- package/locale-data/es-CL.js +325 -343
- package/locale-data/es-CO.js +7 -25
- package/locale-data/es-CR.js +341 -359
- package/locale-data/es-CU.js +343 -361
- package/locale-data/es-DO.js +227 -245
- package/locale-data/es-EA.js +6 -24
- package/locale-data/es-EC.js +341 -359
- package/locale-data/es-GQ.js +6 -24
- package/locale-data/es-GT.js +325 -343
- package/locale-data/es-HN.js +341 -359
- package/locale-data/es-IC.js +6 -24
- package/locale-data/es-MX.js +344 -362
- package/locale-data/es-NI.js +341 -359
- package/locale-data/es-PA.js +207 -225
- package/locale-data/es-PE.js +341 -359
- package/locale-data/es-PH.js +6 -24
- package/locale-data/es-PR.js +207 -225
- package/locale-data/es-PY.js +341 -359
- package/locale-data/es-SV.js +341 -359
- package/locale-data/es-US.js +8 -30
- package/locale-data/es-UY.js +341 -359
- package/locale-data/es-VE.js +227 -245
- package/locale-data/es.js +6 -24
- package/locale-data/et.js +6 -24
- package/locale-data/eu.js +535 -557
- package/locale-data/fa-AF.js +22 -40
- package/locale-data/fa.js +22 -40
- package/locale-data/ff-Adlm-BF.js +6 -24
- package/locale-data/ff-Adlm-CM.js +6 -24
- package/locale-data/ff-Adlm-GH.js +6 -24
- package/locale-data/ff-Adlm-GM.js +6 -24
- package/locale-data/ff-Adlm-GW.js +6 -24
- package/locale-data/ff-Adlm-LR.js +6 -24
- package/locale-data/ff-Adlm-MR.js +6 -24
- package/locale-data/ff-Adlm-NE.js +6 -24
- package/locale-data/ff-Adlm-NG.js +6 -24
- package/locale-data/ff-Adlm-SL.js +6 -24
- package/locale-data/ff-Adlm-SN.js +6 -24
- package/locale-data/ff-Adlm.js +6 -24
- package/locale-data/fi.js +6 -24
- package/locale-data/fil.js +6 -24
- package/locale-data/fo-DK.js +31 -43
- package/locale-data/fo.js +31 -43
- package/locale-data/fr-BE.js +6 -24
- package/locale-data/fr-BF.js +6 -24
- package/locale-data/fr-BI.js +6 -24
- package/locale-data/fr-BJ.js +6 -24
- package/locale-data/fr-BL.js +6 -24
- package/locale-data/fr-CA.js +66 -88
- package/locale-data/fr-CD.js +6 -24
- package/locale-data/fr-CF.js +6 -24
- package/locale-data/fr-CG.js +6 -24
- package/locale-data/fr-CH.js +6 -24
- package/locale-data/fr-CI.js +6 -24
- package/locale-data/fr-CM.js +6 -24
- package/locale-data/fr-DJ.js +6 -24
- package/locale-data/fr-DZ.js +6 -24
- package/locale-data/fr-GA.js +6 -24
- package/locale-data/fr-GF.js +6 -24
- package/locale-data/fr-GN.js +6 -24
- package/locale-data/fr-GP.js +6 -24
- package/locale-data/fr-GQ.js +6 -24
- package/locale-data/fr-HT.js +6 -24
- package/locale-data/fr-KM.js +6 -24
- package/locale-data/fr-LU.js +6 -24
- package/locale-data/fr-MA.js +6 -24
- package/locale-data/fr-MC.js +6 -24
- package/locale-data/fr-MF.js +6 -24
- package/locale-data/fr-MG.js +6 -24
- package/locale-data/fr-ML.js +6 -24
- package/locale-data/fr-MQ.js +6 -24
- package/locale-data/fr-MR.js +6 -24
- package/locale-data/fr-MU.js +6 -24
- package/locale-data/fr-NC.js +6 -24
- package/locale-data/fr-NE.js +6 -24
- package/locale-data/fr-PF.js +6 -24
- package/locale-data/fr-PM.js +6 -24
- package/locale-data/fr-RE.js +6 -24
- package/locale-data/fr-RW.js +6 -24
- package/locale-data/fr-SC.js +6 -24
- package/locale-data/fr-SN.js +6 -24
- package/locale-data/fr-SY.js +6 -24
- package/locale-data/fr-TD.js +6 -24
- package/locale-data/fr-TG.js +6 -24
- package/locale-data/fr-TN.js +6 -24
- package/locale-data/fr-VU.js +6 -24
- package/locale-data/fr-WF.js +6 -24
- package/locale-data/fr-YT.js +6 -24
- package/locale-data/fr.js +6 -24
- package/locale-data/fy.js +6 -18
- package/locale-data/ga-GB.js +6 -24
- package/locale-data/ga.js +6 -24
- package/locale-data/gd.js +82 -104
- package/locale-data/gl.js +6 -24
- package/locale-data/gu.js +6 -24
- package/locale-data/ha-GH.js +6 -24
- package/locale-data/ha-NE.js +6 -24
- package/locale-data/ha.js +6 -24
- package/locale-data/he.js +6 -24
- package/locale-data/hi.js +6 -24
- package/locale-data/hr-BA.js +6 -24
- package/locale-data/hr.js +6 -24
- package/locale-data/hsb.js +6 -24
- package/locale-data/hu.js +14 -26
- package/locale-data/hy.js +6 -24
- package/locale-data/ia.js +919 -55
- package/locale-data/id.js +6 -28
- package/locale-data/ig.js +6 -24
- package/locale-data/is.js +6 -24
- package/locale-data/it-CH.js +131 -149
- package/locale-data/it-SM.js +131 -149
- package/locale-data/it-VA.js +131 -149
- package/locale-data/it.js +131 -149
- package/locale-data/ja.js +6 -24
- package/locale-data/jv.js +6 -24
- package/locale-data/ka.js +6 -24
- package/locale-data/kea.js +6 -18
- package/locale-data/kgp.js +6 -24
- package/locale-data/kk.js +6 -24
- package/locale-data/km.js +6 -24
- package/locale-data/kn.js +6 -24
- package/locale-data/ko-KP.js +50 -68
- package/locale-data/ko.js +50 -68
- package/locale-data/kok.js +6 -24
- package/locale-data/ks-Arab.js +35 -47
- package/locale-data/ks.js +35 -47
- package/locale-data/ku.js +2380 -580
- package/locale-data/ky.js +6 -24
- package/locale-data/lb.js +6 -24
- package/locale-data/lo.js +28 -46
- package/locale-data/lt.js +6 -24
- package/locale-data/lv.js +6 -24
- package/locale-data/mai.js +6 -24
- package/locale-data/mi.js +1017 -15
- package/locale-data/mk.js +8 -26
- package/locale-data/ml.js +16 -34
- package/locale-data/mn.js +6 -24
- package/locale-data/mni-Beng.js +4 -10
- package/locale-data/mni.js +4 -10
- package/locale-data/mr.js +6 -24
- package/locale-data/ms-BN.js +6 -24
- package/locale-data/ms-ID.js +6 -24
- package/locale-data/ms-SG.js +6 -24
- package/locale-data/ms.js +6 -24
- package/locale-data/mt.js +52 -0
- package/locale-data/my.js +6 -24
- package/locale-data/nb-SJ.js +6 -28
- package/locale-data/nb.js +6 -28
- package/locale-data/nds-NL.js +312 -234
- package/locale-data/nds.js +312 -234
- package/locale-data/ne-IN.js +25 -43
- package/locale-data/ne.js +25 -43
- package/locale-data/nl-AW.js +496 -518
- package/locale-data/nl-BE.js +496 -518
- package/locale-data/nl-BQ.js +496 -518
- package/locale-data/nl-CW.js +496 -518
- package/locale-data/nl-SR.js +496 -518
- package/locale-data/nl-SX.js +496 -518
- package/locale-data/nl.js +496 -518
- package/locale-data/nn.js +8 -30
- package/locale-data/no.js +6 -28
- package/locale-data/om-KE.js +9 -9
- package/locale-data/or.js +6 -24
- package/locale-data/pa-Guru.js +6 -24
- package/locale-data/pa.js +6 -24
- package/locale-data/pcm.js +6 -24
- package/locale-data/pl.js +6 -24
- package/locale-data/ps-PK.js +28 -46
- package/locale-data/ps.js +28 -46
- package/locale-data/pt-AO.js +6 -24
- package/locale-data/pt-CH.js +6 -24
- package/locale-data/pt-CV.js +6 -24
- package/locale-data/pt-GQ.js +6 -24
- package/locale-data/pt-GW.js +6 -24
- package/locale-data/pt-LU.js +6 -24
- package/locale-data/pt-MO.js +6 -24
- package/locale-data/pt-MZ.js +6 -24
- package/locale-data/pt-PT.js +6 -24
- package/locale-data/pt-ST.js +6 -24
- package/locale-data/pt-TL.js +6 -24
- package/locale-data/pt.js +6 -24
- package/locale-data/qu-BO.js +186 -204
- package/locale-data/qu-EC.js +186 -204
- package/locale-data/qu.js +186 -204
- package/locale-data/rm.js +0 -6
- package/locale-data/ro-MD.js +6 -24
- package/locale-data/ro.js +6 -24
- package/locale-data/ru-BY.js +6 -24
- package/locale-data/ru-KG.js +6 -24
- package/locale-data/ru-KZ.js +6 -24
- package/locale-data/ru-MD.js +6 -24
- package/locale-data/ru-UA.js +6 -24
- package/locale-data/ru.js +6 -24
- package/locale-data/sa.js +0 -6
- package/locale-data/sah.js +78 -0
- package/locale-data/sat-Olck.js +0 -6
- package/locale-data/sat.js +0 -6
- package/locale-data/sc.js +6 -28
- package/locale-data/sd-Arab.js +6 -24
- package/locale-data/sd-Deva.js +0 -6
- package/locale-data/sd.js +6 -24
- package/locale-data/se-FI.js +6 -24
- package/locale-data/si.js +6 -24
- package/locale-data/sk.js +6 -24
- package/locale-data/sl.js +40 -58
- package/locale-data/so-DJ.js +6 -24
- package/locale-data/so-ET.js +6 -24
- package/locale-data/so-KE.js +6 -24
- package/locale-data/so.js +6 -24
- package/locale-data/sq-MK.js +13 -31
- package/locale-data/sq-XK.js +13 -31
- package/locale-data/sq.js +13 -31
- package/locale-data/sr-Cyrl-BA.js +6 -24
- package/locale-data/sr-Cyrl-ME.js +6 -24
- package/locale-data/sr-Cyrl-XK.js +6 -24
- package/locale-data/sr-Cyrl.js +6 -24
- package/locale-data/sr-Latn-BA.js +6 -24
- package/locale-data/sr-Latn-ME.js +6 -24
- package/locale-data/sr-Latn-XK.js +6 -24
- package/locale-data/sr-Latn.js +6 -24
- package/locale-data/sr.js +6 -24
- package/locale-data/su-Latn.js +0 -6
- package/locale-data/su.js +0 -6
- package/locale-data/sv-AX.js +8 -26
- package/locale-data/sv-FI.js +8 -26
- package/locale-data/sv.js +8 -26
- package/locale-data/sw-CD.js +6 -24
- package/locale-data/sw-KE.js +6 -24
- package/locale-data/sw-UG.js +6 -24
- package/locale-data/sw.js +6 -24
- package/locale-data/ta-LK.js +170 -188
- package/locale-data/ta-MY.js +294 -312
- package/locale-data/ta-SG.js +294 -312
- package/locale-data/ta.js +294 -312
- package/locale-data/te.js +6 -24
- package/locale-data/tg.js +1 -7
- package/locale-data/th.js +6 -24
- package/locale-data/tk.js +6 -24
- package/locale-data/to.js +12 -30
- package/locale-data/tr-CY.js +26 -44
- package/locale-data/tr.js +26 -44
- package/locale-data/tt.js +0 -6
- package/locale-data/ug.js +6 -24
- package/locale-data/uk.js +40 -58
- package/locale-data/ur-IN.js +6 -24
- package/locale-data/ur.js +6 -24
- package/locale-data/uz-Cyrl.js +6 -18
- package/locale-data/uz-Latn.js +6 -24
- package/locale-data/uz.js +6 -24
- package/locale-data/vi.js +551 -573
- package/locale-data/wo.js +0 -6
- package/locale-data/xh.js +6 -24
- package/locale-data/yi.js +1 -0
- package/locale-data/yo-BJ.js +6 -24
- package/locale-data/yo.js +6 -24
- package/locale-data/yrl-CO.js +6 -24
- package/locale-data/yrl-VE.js +6 -24
- package/locale-data/yrl.js +6 -24
- package/locale-data/yue-Hans.js +6 -24
- package/locale-data/yue-Hant.js +6 -24
- package/locale-data/yue.js +6 -24
- package/locale-data/zh-Hans-HK.js +13 -31
- package/locale-data/zh-Hans-MO.js +32 -50
- package/locale-data/zh-Hans-SG.js +32 -50
- package/locale-data/zh-Hans.js +32 -50
- package/locale-data/zh-Hant-HK.js +6 -28
- package/locale-data/zh-Hant-MO.js +6 -28
- package/locale-data/zh-Hant.js +6 -28
- package/locale-data/zh.js +32 -50
- package/locale-data/zu.js +6 -24
- package/package.json +6 -6
- package/polyfill-force.js +11 -1
- package/polyfill.iife.js +688 -501
- package/should-polyfill.js +1 -2
- package/src/abstract/BasicFormatMatcher.js +1 -2
- package/src/abstract/BestFitFormatMatcher.js +2 -3
- package/src/abstract/DateTimeStyleFormat.js +1 -2
- package/src/abstract/FormatDateTime.js +1 -2
- package/src/abstract/FormatDateTimePattern.js +1 -2
- package/src/abstract/FormatDateTimeRange.js +1 -2
- package/src/abstract/FormatDateTimeRangeToParts.js +1 -2
- package/src/abstract/FormatDateTimeToParts.js +1 -2
- package/src/abstract/InitializeDateTimeFormat.js +1 -2
- package/src/abstract/PartitionDateTimePattern.js +1 -2
- package/src/abstract/PartitionDateTimeRangePattern.js +1 -2
- package/src/abstract/ToDateTimeOptions.js +1 -2
- package/src/abstract/ToLocalTime.js +1 -2
- package/src/abstract/skeleton.js +4 -5
- package/src/data/all-tz.js +212 -212
- package/src/data/links.d.ts +12 -0
- package/src/data/links.js +12 -0
- package/src/get_internal_slots.js +1 -1
- package/src/packer.js +2 -3
- package/src/to_locale_string.js +3 -4
- package/test262-main.js +171 -341
package/polyfill.iife.js
CHANGED
|
@@ -1,66 +1,43 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.constructor = d;
|
|
19
|
-
}
|
|
20
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
21
|
-
}
|
|
22
|
-
var __assign = function() {
|
|
23
|
-
__assign = Object.assign || function __assign2(t) {
|
|
24
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
-
s = arguments[i];
|
|
26
|
-
for (var p in s)
|
|
27
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
28
|
-
t[p] = s[p];
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __pow = Math.pow;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
29
18
|
}
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
return __assign.apply(this, arguments);
|
|
19
|
+
return a;
|
|
33
20
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return t;
|
|
45
|
-
}
|
|
46
|
-
function __spreadArray(to, from, pack) {
|
|
47
|
-
if (pack || arguments.length === 2)
|
|
48
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
49
|
-
if (ar || !(i in from)) {
|
|
50
|
-
if (!ar)
|
|
51
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
52
|
-
ar[i] = from[i];
|
|
53
|
-
}
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
54
31
|
}
|
|
55
|
-
return
|
|
56
|
-
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
57
34
|
|
|
58
|
-
//
|
|
35
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js
|
|
59
36
|
function CanonicalizeLocaleList(locales) {
|
|
60
37
|
return Intl.getCanonicalLocales(locales);
|
|
61
38
|
}
|
|
62
39
|
|
|
63
|
-
//
|
|
40
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeTimeZoneName.js
|
|
64
41
|
function CanonicalizeTimeZoneName(tz, _a) {
|
|
65
42
|
var zoneNames = _a.zoneNames, uppercaseLinks = _a.uppercaseLinks;
|
|
66
43
|
var uppercasedTz = tz.toUpperCase();
|
|
@@ -75,7 +52,7 @@
|
|
|
75
52
|
return ianaTimeZone;
|
|
76
53
|
}
|
|
77
54
|
|
|
78
|
-
//
|
|
55
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
|
|
79
56
|
function ToString(o) {
|
|
80
57
|
if (typeof o === "symbol") {
|
|
81
58
|
throw TypeError("Cannot convert a Symbol value to a string");
|
|
@@ -326,7 +303,7 @@
|
|
|
326
303
|
return mod(t, MS_PER_SECOND);
|
|
327
304
|
}
|
|
328
305
|
|
|
329
|
-
//
|
|
306
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js
|
|
330
307
|
function DefaultNumberOption(inputVal, min, max, fallback) {
|
|
331
308
|
if (inputVal === void 0) {
|
|
332
309
|
return fallback;
|
|
@@ -338,13 +315,13 @@
|
|
|
338
315
|
return Math.floor(val);
|
|
339
316
|
}
|
|
340
317
|
|
|
341
|
-
//
|
|
318
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js
|
|
342
319
|
function GetNumberOption(options, property, minimum, maximum, fallback) {
|
|
343
320
|
var val = options[property];
|
|
344
321
|
return DefaultNumberOption(val, minimum, maximum, fallback);
|
|
345
322
|
}
|
|
346
323
|
|
|
347
|
-
//
|
|
324
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
|
|
348
325
|
function GetOption(opts, prop, type, values, fallback) {
|
|
349
326
|
if (typeof opts !== "object") {
|
|
350
327
|
throw new TypeError("Options must be an object");
|
|
@@ -370,7 +347,7 @@
|
|
|
370
347
|
return fallback;
|
|
371
348
|
}
|
|
372
349
|
|
|
373
|
-
//
|
|
350
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
|
|
374
351
|
var SANCTIONED_UNITS = [
|
|
375
352
|
"angle-degree",
|
|
376
353
|
"area-acre",
|
|
@@ -421,7 +398,7 @@
|
|
|
421
398
|
}
|
|
422
399
|
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
423
400
|
|
|
424
|
-
//
|
|
401
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsValidTimeZoneName.js
|
|
425
402
|
function IsValidTimeZoneName(tz, _a) {
|
|
426
403
|
var zoneNamesFromData = _a.zoneNamesFromData, uppercaseLinks = _a.uppercaseLinks;
|
|
427
404
|
var uppercasedTz = tz.toUpperCase();
|
|
@@ -439,7 +416,39 @@
|
|
|
439
416
|
return zoneNames.has(uppercasedTz) || linkNames.has(uppercasedTz);
|
|
440
417
|
}
|
|
441
418
|
|
|
442
|
-
//
|
|
419
|
+
// node_modules/.aspect_rules_js/tslib@2.8.0/node_modules/tslib/tslib.es6.mjs
|
|
420
|
+
var extendStatics = function(d, b) {
|
|
421
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
422
|
+
d2.__proto__ = b2;
|
|
423
|
+
} || function(d2, b2) {
|
|
424
|
+
for (var p in b2)
|
|
425
|
+
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
426
|
+
d2[p] = b2[p];
|
|
427
|
+
};
|
|
428
|
+
return extendStatics(d, b);
|
|
429
|
+
};
|
|
430
|
+
function __extends(d, b) {
|
|
431
|
+
if (typeof b !== "function" && b !== null)
|
|
432
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
433
|
+
extendStatics(d, b);
|
|
434
|
+
function __() {
|
|
435
|
+
this.constructor = d;
|
|
436
|
+
}
|
|
437
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
438
|
+
}
|
|
439
|
+
function __spreadArray(to, from, pack) {
|
|
440
|
+
if (pack || arguments.length === 2)
|
|
441
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
442
|
+
if (ar || !(i in from)) {
|
|
443
|
+
if (!ar)
|
|
444
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
445
|
+
ar[i] = from[i];
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
|
|
443
452
|
function memoize(fn, options) {
|
|
444
453
|
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
445
454
|
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
@@ -506,7 +515,7 @@
|
|
|
506
515
|
monadic: strategyMonadic
|
|
507
516
|
};
|
|
508
517
|
|
|
509
|
-
//
|
|
518
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
510
519
|
function defineProperty(target, name, _a) {
|
|
511
520
|
var value = _a.value;
|
|
512
521
|
Object.defineProperty(target, name, {
|
|
@@ -575,19 +584,19 @@
|
|
|
575
584
|
strategy: strategies.variadic
|
|
576
585
|
});
|
|
577
586
|
|
|
578
|
-
//
|
|
587
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
|
|
579
588
|
var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
|
|
580
589
|
|
|
581
|
-
//
|
|
590
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
|
|
582
591
|
var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
|
|
583
592
|
var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
|
|
584
593
|
|
|
585
|
-
//
|
|
594
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js
|
|
586
595
|
function CanonicalizeLocaleList2(locales) {
|
|
587
596
|
return Intl.getCanonicalLocales(locales);
|
|
588
597
|
}
|
|
589
598
|
|
|
590
|
-
//
|
|
599
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/languageMatching.js
|
|
591
600
|
var data = {
|
|
592
601
|
supplemental: {
|
|
593
602
|
languageMatching: {
|
|
@@ -3209,7 +3218,7 @@
|
|
|
3209
3218
|
}
|
|
3210
3219
|
};
|
|
3211
3220
|
|
|
3212
|
-
//
|
|
3221
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/regions.generated.js
|
|
3213
3222
|
var regions = {
|
|
3214
3223
|
"001": [
|
|
3215
3224
|
"001",
|
|
@@ -4544,7 +4553,7 @@
|
|
|
4544
4553
|
]
|
|
4545
4554
|
};
|
|
4546
4555
|
|
|
4547
|
-
//
|
|
4556
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js
|
|
4548
4557
|
var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
4549
4558
|
function invariant2(condition, message, Err) {
|
|
4550
4559
|
if (Err === void 0) {
|
|
@@ -4698,7 +4707,7 @@
|
|
|
4698
4707
|
return result;
|
|
4699
4708
|
}
|
|
4700
4709
|
|
|
4701
|
-
//
|
|
4710
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js
|
|
4702
4711
|
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4703
4712
|
var foundLocale;
|
|
4704
4713
|
var extension;
|
|
@@ -4723,7 +4732,7 @@
|
|
|
4723
4732
|
};
|
|
4724
4733
|
}
|
|
4725
4734
|
|
|
4726
|
-
//
|
|
4735
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js
|
|
4727
4736
|
function BestAvailableLocale(availableLocales, locale) {
|
|
4728
4737
|
var candidate = locale;
|
|
4729
4738
|
while (true) {
|
|
@@ -4741,7 +4750,7 @@
|
|
|
4741
4750
|
}
|
|
4742
4751
|
}
|
|
4743
4752
|
|
|
4744
|
-
//
|
|
4753
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js
|
|
4745
4754
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4746
4755
|
var result = { locale: "" };
|
|
4747
4756
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4760,7 +4769,7 @@
|
|
|
4760
4769
|
return result;
|
|
4761
4770
|
}
|
|
4762
4771
|
|
|
4763
|
-
//
|
|
4772
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js
|
|
4764
4773
|
function UnicodeExtensionValue(extension, key) {
|
|
4765
4774
|
invariant2(key.length === 2, "key must have 2 elements");
|
|
4766
4775
|
var size = extension.length;
|
|
@@ -4799,7 +4808,7 @@
|
|
|
4799
4808
|
return void 0;
|
|
4800
4809
|
}
|
|
4801
4810
|
|
|
4802
|
-
//
|
|
4811
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js
|
|
4803
4812
|
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
4804
4813
|
var matcher = options.localeMatcher;
|
|
4805
4814
|
var r;
|
|
@@ -4863,7 +4872,7 @@
|
|
|
4863
4872
|
return result;
|
|
4864
4873
|
}
|
|
4865
4874
|
|
|
4866
|
-
//
|
|
4875
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js
|
|
4867
4876
|
function LookupSupportedLocales(availableLocales, requestedLocales) {
|
|
4868
4877
|
var subset = [];
|
|
4869
4878
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4877,7 +4886,7 @@
|
|
|
4877
4886
|
return subset;
|
|
4878
4887
|
}
|
|
4879
4888
|
|
|
4880
|
-
//
|
|
4889
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/index.js
|
|
4881
4890
|
function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
4882
4891
|
return ResolveLocale(availableLocales, CanonicalizeLocaleList2(requestedLocales), {
|
|
4883
4892
|
localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || "best fit"
|
|
@@ -4886,7 +4895,7 @@
|
|
|
4886
4895
|
}).locale;
|
|
4887
4896
|
}
|
|
4888
4897
|
|
|
4889
|
-
//
|
|
4898
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/PartitionPattern.js
|
|
4890
4899
|
function PartitionPattern(pattern) {
|
|
4891
4900
|
var result = [];
|
|
4892
4901
|
var beginIndex = pattern.indexOf("{");
|
|
@@ -4918,7 +4927,7 @@
|
|
|
4918
4927
|
return result;
|
|
4919
4928
|
}
|
|
4920
4929
|
|
|
4921
|
-
//
|
|
4930
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js
|
|
4922
4931
|
function SupportedLocales(availableLocales, requestedLocales, options) {
|
|
4923
4932
|
var matcher = "best fit";
|
|
4924
4933
|
if (options !== void 0) {
|
|
@@ -4931,7 +4940,7 @@
|
|
|
4931
4940
|
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
|
|
4932
4941
|
}
|
|
4933
4942
|
|
|
4934
|
-
//
|
|
4943
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
|
|
4935
4944
|
var MissingLocaleDataError = (
|
|
4936
4945
|
/** @class */
|
|
4937
4946
|
function(_super) {
|
|
@@ -4945,7 +4954,7 @@
|
|
|
4945
4954
|
}(Error)
|
|
4946
4955
|
);
|
|
4947
4956
|
|
|
4948
|
-
//
|
|
4957
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
|
|
4949
4958
|
var RangePatternType;
|
|
4950
4959
|
(function(RangePatternType2) {
|
|
4951
4960
|
RangePatternType2["startRange"] = "startRange";
|
|
@@ -4953,32 +4962,33 @@
|
|
|
4953
4962
|
RangePatternType2["endRange"] = "endRange";
|
|
4954
4963
|
})(RangePatternType || (RangePatternType = {}));
|
|
4955
4964
|
|
|
4956
|
-
//
|
|
4965
|
+
// packages/intl-datetimeformat/src/abstract/ToLocalTime.ts
|
|
4957
4966
|
function getApplicableZoneData(t, timeZone, tzData) {
|
|
4958
|
-
|
|
4959
|
-
var zoneData = tzData[timeZone];
|
|
4967
|
+
const zoneData = tzData[timeZone];
|
|
4960
4968
|
if (!zoneData) {
|
|
4961
4969
|
return [0, false];
|
|
4962
4970
|
}
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4971
|
+
let i = 0;
|
|
4972
|
+
let offset = 0;
|
|
4973
|
+
let dst = false;
|
|
4966
4974
|
for (; i <= zoneData.length; i++) {
|
|
4967
4975
|
if (i === zoneData.length || zoneData[i][0] * 1e3 > t) {
|
|
4968
4976
|
;
|
|
4969
|
-
|
|
4977
|
+
[, , offset, dst] = zoneData[i - 1];
|
|
4970
4978
|
break;
|
|
4971
4979
|
}
|
|
4972
4980
|
}
|
|
4973
4981
|
return [offset * 1e3, dst];
|
|
4974
4982
|
}
|
|
4975
|
-
function ToLocalTime(t, calendar, timeZone,
|
|
4976
|
-
var tzData = _a.tzData;
|
|
4983
|
+
function ToLocalTime(t, calendar, timeZone, { tzData }) {
|
|
4977
4984
|
invariant(Type(t) === "Number", "invalid time");
|
|
4978
|
-
invariant(
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4985
|
+
invariant(
|
|
4986
|
+
calendar === "gregory",
|
|
4987
|
+
"We only support Gregory calendar right now"
|
|
4988
|
+
);
|
|
4989
|
+
const [timeZoneOffset, inDST] = getApplicableZoneData(t, timeZone, tzData);
|
|
4990
|
+
const tz = t + timeZoneOffset;
|
|
4991
|
+
const year = YearFromTime(tz);
|
|
4982
4992
|
return {
|
|
4983
4993
|
weekday: WeekDay(tz),
|
|
4984
4994
|
era: year < 0 ? "BC" : "AD",
|
|
@@ -4997,7 +5007,7 @@
|
|
|
4997
5007
|
};
|
|
4998
5008
|
}
|
|
4999
5009
|
|
|
5000
|
-
//
|
|
5010
|
+
// packages/intl-datetimeformat/src/abstract/utils.ts
|
|
5001
5011
|
var DATE_TIME_PROPS = [
|
|
5002
5012
|
"weekday",
|
|
5003
5013
|
"era",
|
|
@@ -5020,20 +5030,20 @@
|
|
|
5020
5030
|
var shortMorePenalty = 3;
|
|
5021
5031
|
var offsetPenalty = 1;
|
|
5022
5032
|
|
|
5023
|
-
//
|
|
5033
|
+
// packages/intl-datetimeformat/src/abstract/FormatDateTimePattern.ts
|
|
5024
5034
|
function pad(n) {
|
|
5025
5035
|
if (n < 10) {
|
|
5026
|
-
return
|
|
5036
|
+
return `0${n}`;
|
|
5027
5037
|
}
|
|
5028
5038
|
return String(n);
|
|
5029
5039
|
}
|
|
5030
5040
|
function offsetToGmtString(gmtFormat, hourFormat, offsetInMs, style) {
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5041
|
+
const offsetInMinutes = Math.floor(offsetInMs / 6e4);
|
|
5042
|
+
const mins = Math.abs(offsetInMinutes) % 60;
|
|
5043
|
+
const hours = Math.floor(Math.abs(offsetInMinutes) / 60);
|
|
5044
|
+
const [positivePattern, negativePattern] = hourFormat.split(";");
|
|
5045
|
+
let offsetStr = "";
|
|
5046
|
+
let pattern = offsetInMs < 0 ? negativePattern : positivePattern;
|
|
5037
5047
|
if (style === "long") {
|
|
5038
5048
|
offsetStr = pattern.replace("HH", pad(hours)).replace("H", String(hours)).replace("mm", pad(mins)).replace("m", String(mins));
|
|
5039
5049
|
} else if (mins || hours) {
|
|
@@ -5044,77 +5054,87 @@
|
|
|
5044
5054
|
}
|
|
5045
5055
|
return gmtFormat.replace("{0}", offsetStr);
|
|
5046
5056
|
}
|
|
5047
|
-
function FormatDateTimePattern(dtf, patternParts, x,
|
|
5048
|
-
|
|
5057
|
+
function FormatDateTimePattern(dtf, patternParts, x, {
|
|
5058
|
+
getInternalSlots: getInternalSlots2,
|
|
5059
|
+
localeData,
|
|
5060
|
+
getDefaultTimeZone,
|
|
5061
|
+
tzData
|
|
5062
|
+
}) {
|
|
5049
5063
|
x = TimeClip(x);
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5064
|
+
const internalSlots = getInternalSlots2(dtf);
|
|
5065
|
+
const dataLocale = internalSlots.dataLocale;
|
|
5066
|
+
const dataLocaleData = localeData[dataLocale];
|
|
5067
|
+
const locale = internalSlots.locale;
|
|
5068
|
+
const nfOptions = /* @__PURE__ */ Object.create(null);
|
|
5055
5069
|
nfOptions.useGrouping = false;
|
|
5056
|
-
|
|
5057
|
-
|
|
5070
|
+
const nf = createMemoizedNumberFormat(locale, nfOptions);
|
|
5071
|
+
const nf2Options = /* @__PURE__ */ Object.create(null);
|
|
5058
5072
|
nf2Options.minimumIntegerDigits = 2;
|
|
5059
5073
|
nf2Options.useGrouping = false;
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5074
|
+
const nf2 = createMemoizedNumberFormat(locale, nf2Options);
|
|
5075
|
+
const fractionalSecondDigits = internalSlots.fractionalSecondDigits;
|
|
5076
|
+
let nf3;
|
|
5063
5077
|
if (fractionalSecondDigits !== void 0) {
|
|
5064
|
-
|
|
5078
|
+
const nf3Options = /* @__PURE__ */ Object.create(null);
|
|
5065
5079
|
nf3Options.minimumIntegerDigits = fractionalSecondDigits;
|
|
5066
5080
|
nf3Options.useGrouping = false;
|
|
5067
5081
|
nf3 = createMemoizedNumberFormat(locale, nf3Options);
|
|
5068
5082
|
}
|
|
5069
|
-
|
|
5083
|
+
const tm = ToLocalTime(
|
|
5070
5084
|
x,
|
|
5071
5085
|
// @ts-ignore
|
|
5072
5086
|
internalSlots.calendar,
|
|
5073
5087
|
internalSlots.timeZone,
|
|
5074
5088
|
{ tzData }
|
|
5075
5089
|
);
|
|
5076
|
-
|
|
5077
|
-
for (
|
|
5078
|
-
|
|
5079
|
-
var p = patternPart.type;
|
|
5090
|
+
const result = [];
|
|
5091
|
+
for (const patternPart of patternParts) {
|
|
5092
|
+
const p = patternPart.type;
|
|
5080
5093
|
if (p === "literal") {
|
|
5081
5094
|
result.push({
|
|
5082
5095
|
type: "literal",
|
|
5083
5096
|
value: patternPart.value
|
|
5084
5097
|
});
|
|
5085
5098
|
} else if (p === "fractionalSecondDigits") {
|
|
5086
|
-
|
|
5099
|
+
const v = Math.floor(
|
|
5100
|
+
tm.millisecond * __pow(10, (fractionalSecondDigits || 0) - 3)
|
|
5101
|
+
);
|
|
5087
5102
|
result.push({
|
|
5088
5103
|
type: "fractionalSecond",
|
|
5089
5104
|
value: nf3.format(v)
|
|
5090
5105
|
});
|
|
5091
5106
|
} else if (p === "dayPeriod") {
|
|
5092
|
-
|
|
5093
|
-
|
|
5107
|
+
const f = internalSlots.dayPeriod;
|
|
5108
|
+
const fv = tm[f];
|
|
5094
5109
|
result.push({ type: p, value: fv });
|
|
5095
5110
|
} else if (p === "timeZoneName") {
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5111
|
+
const f = internalSlots.timeZoneName;
|
|
5112
|
+
let fv;
|
|
5113
|
+
const { timeZoneName, gmtFormat, hourFormat } = dataLocaleData;
|
|
5114
|
+
const timeZone = internalSlots.timeZone || getDefaultTimeZone();
|
|
5115
|
+
const timeZoneData = timeZoneName[timeZone];
|
|
5101
5116
|
if (timeZoneData && timeZoneData[f]) {
|
|
5102
5117
|
fv = timeZoneData[f][+tm.inDST];
|
|
5103
5118
|
} else {
|
|
5104
|
-
fv = offsetToGmtString(
|
|
5119
|
+
fv = offsetToGmtString(
|
|
5120
|
+
gmtFormat,
|
|
5121
|
+
hourFormat,
|
|
5122
|
+
tm.timeZoneOffset,
|
|
5123
|
+
f
|
|
5124
|
+
);
|
|
5105
5125
|
}
|
|
5106
5126
|
result.push({ type: p, value: fv });
|
|
5107
5127
|
} else if (DATE_TIME_PROPS.indexOf(p) > -1) {
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5128
|
+
let fv = "";
|
|
5129
|
+
const f = internalSlots[p];
|
|
5130
|
+
let v = tm[p];
|
|
5111
5131
|
if (p === "year" && v <= 0) {
|
|
5112
5132
|
v = 1 - v;
|
|
5113
5133
|
}
|
|
5114
5134
|
if (p === "month") {
|
|
5115
5135
|
v++;
|
|
5116
5136
|
}
|
|
5117
|
-
|
|
5137
|
+
const hourCycle = internalSlots.hourCycle;
|
|
5118
5138
|
if (p === "hour" && (hourCycle === "h11" || hourCycle === "h12")) {
|
|
5119
5139
|
v = v % 12;
|
|
5120
5140
|
if (v === 0 && hourCycle === "h12") {
|
|
@@ -5147,8 +5167,8 @@
|
|
|
5147
5167
|
value: fv
|
|
5148
5168
|
});
|
|
5149
5169
|
} else if (p === "ampm") {
|
|
5150
|
-
|
|
5151
|
-
|
|
5170
|
+
const v = tm.hour;
|
|
5171
|
+
let fv;
|
|
5152
5172
|
if (v > 11) {
|
|
5153
5173
|
fv = dataLocaleData.pm;
|
|
5154
5174
|
} else {
|
|
@@ -5159,16 +5179,16 @@
|
|
|
5159
5179
|
value: fv
|
|
5160
5180
|
});
|
|
5161
5181
|
} else if (p === "relatedYear") {
|
|
5162
|
-
|
|
5163
|
-
|
|
5182
|
+
const v = tm.relatedYear;
|
|
5183
|
+
const fv = nf.format(v);
|
|
5164
5184
|
result.push({
|
|
5165
5185
|
// @ts-ignore TODO: Fix TS type
|
|
5166
5186
|
type: "relatedYear",
|
|
5167
5187
|
value: fv
|
|
5168
5188
|
});
|
|
5169
5189
|
} else if (p === "yearName") {
|
|
5170
|
-
|
|
5171
|
-
|
|
5190
|
+
const v = tm.yearName;
|
|
5191
|
+
const fv = nf.format(v);
|
|
5172
5192
|
result.push({
|
|
5173
5193
|
// @ts-ignore TODO: Fix TS type
|
|
5174
5194
|
type: "yearName",
|
|
@@ -5179,30 +5199,34 @@
|
|
|
5179
5199
|
return result;
|
|
5180
5200
|
}
|
|
5181
5201
|
|
|
5182
|
-
//
|
|
5202
|
+
// packages/intl-datetimeformat/src/abstract/PartitionDateTimePattern.ts
|
|
5183
5203
|
function PartitionDateTimePattern(dtf, x, implDetails) {
|
|
5184
5204
|
x = TimeClip(x);
|
|
5185
5205
|
if (isNaN(x)) {
|
|
5186
5206
|
throw new RangeError("invalid time");
|
|
5187
5207
|
}
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
return FormatDateTimePattern(
|
|
5208
|
+
const { getInternalSlots: getInternalSlots2 } = implDetails;
|
|
5209
|
+
const internalSlots = getInternalSlots2(dtf);
|
|
5210
|
+
const { pattern } = internalSlots;
|
|
5211
|
+
return FormatDateTimePattern(
|
|
5212
|
+
dtf,
|
|
5213
|
+
PartitionPattern(pattern),
|
|
5214
|
+
x,
|
|
5215
|
+
implDetails
|
|
5216
|
+
);
|
|
5192
5217
|
}
|
|
5193
5218
|
|
|
5194
|
-
//
|
|
5219
|
+
// packages/intl-datetimeformat/src/abstract/FormatDateTime.ts
|
|
5195
5220
|
function FormatDateTime(dtf, x, implDetails) {
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
for (
|
|
5199
|
-
var part = parts_1[_i];
|
|
5221
|
+
const parts = PartitionDateTimePattern(dtf, x, implDetails);
|
|
5222
|
+
let result = "";
|
|
5223
|
+
for (const part of parts) {
|
|
5200
5224
|
result += part.value;
|
|
5201
5225
|
}
|
|
5202
5226
|
return result;
|
|
5203
5227
|
}
|
|
5204
5228
|
|
|
5205
|
-
//
|
|
5229
|
+
// packages/intl-datetimeformat/src/abstract/PartitionDateTimeRangePattern.ts
|
|
5206
5230
|
var TABLE_2_FIELDS = [
|
|
5207
5231
|
"era",
|
|
5208
5232
|
"year",
|
|
@@ -5224,54 +5248,57 @@
|
|
|
5224
5248
|
if (isNaN(y)) {
|
|
5225
5249
|
throw new RangeError("Invalid end time");
|
|
5226
5250
|
}
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5251
|
+
const { getInternalSlots: getInternalSlots2, tzData } = implDetails;
|
|
5252
|
+
const internalSlots = getInternalSlots2(dtf);
|
|
5253
|
+
const tm1 = ToLocalTime(
|
|
5230
5254
|
x,
|
|
5231
5255
|
// @ts-ignore
|
|
5232
5256
|
internalSlots.calendar,
|
|
5233
5257
|
internalSlots.timeZone,
|
|
5234
5258
|
{ tzData }
|
|
5235
5259
|
);
|
|
5236
|
-
|
|
5260
|
+
const tm2 = ToLocalTime(
|
|
5237
5261
|
y,
|
|
5238
5262
|
// @ts-ignore
|
|
5239
5263
|
internalSlots.calendar,
|
|
5240
5264
|
internalSlots.timeZone,
|
|
5241
5265
|
{ tzData }
|
|
5242
5266
|
);
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
for (
|
|
5248
|
-
var fieldName = TABLE_2_FIELDS_1[_i];
|
|
5267
|
+
const { pattern, rangePatterns } = internalSlots;
|
|
5268
|
+
let rangePattern;
|
|
5269
|
+
let dateFieldsPracticallyEqual = true;
|
|
5270
|
+
let patternContainsLargerDateField = false;
|
|
5271
|
+
for (const fieldName of TABLE_2_FIELDS) {
|
|
5249
5272
|
if (dateFieldsPracticallyEqual && !patternContainsLargerDateField) {
|
|
5250
|
-
|
|
5273
|
+
let rp = fieldName in rangePatterns ? rangePatterns[fieldName] : void 0;
|
|
5251
5274
|
if (rangePattern !== void 0 && rp === void 0) {
|
|
5252
5275
|
patternContainsLargerDateField = true;
|
|
5253
5276
|
} else {
|
|
5254
5277
|
rangePattern = rp;
|
|
5255
5278
|
if (fieldName === "ampm") {
|
|
5256
|
-
|
|
5257
|
-
|
|
5279
|
+
let v1 = tm1.hour;
|
|
5280
|
+
let v2 = tm2.hour;
|
|
5258
5281
|
if (v1 > 11 && v2 < 11 || v1 < 11 && v2 > 11) {
|
|
5259
5282
|
dateFieldsPracticallyEqual = false;
|
|
5260
5283
|
}
|
|
5261
5284
|
} else if (fieldName === "dayPeriod") {
|
|
5262
5285
|
} else if (fieldName === "fractionalSecondDigits") {
|
|
5263
|
-
|
|
5286
|
+
let fractionalSecondDigits = internalSlots.fractionalSecondDigits;
|
|
5264
5287
|
if (fractionalSecondDigits === void 0) {
|
|
5265
5288
|
fractionalSecondDigits = 3;
|
|
5266
5289
|
}
|
|
5267
|
-
|
|
5268
|
-
|
|
5290
|
+
let v1 = Math.floor(
|
|
5291
|
+
tm1.millisecond * __pow(10, fractionalSecondDigits - 3)
|
|
5292
|
+
);
|
|
5293
|
+
let v2 = Math.floor(
|
|
5294
|
+
tm2.millisecond * __pow(10, fractionalSecondDigits - 3)
|
|
5295
|
+
);
|
|
5269
5296
|
if (!SameValue(v1, v2)) {
|
|
5270
5297
|
dateFieldsPracticallyEqual = false;
|
|
5271
5298
|
}
|
|
5272
5299
|
} else {
|
|
5273
|
-
|
|
5274
|
-
|
|
5300
|
+
let v1 = tm1[fieldName];
|
|
5301
|
+
let v2 = tm2[fieldName];
|
|
5275
5302
|
if (!SameValue(v1, v2)) {
|
|
5276
5303
|
dateFieldsPracticallyEqual = false;
|
|
5277
5304
|
}
|
|
@@ -5280,36 +5307,37 @@
|
|
|
5280
5307
|
}
|
|
5281
5308
|
}
|
|
5282
5309
|
if (dateFieldsPracticallyEqual) {
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5310
|
+
let result2 = FormatDateTimePattern(
|
|
5311
|
+
dtf,
|
|
5312
|
+
PartitionPattern(pattern),
|
|
5313
|
+
x,
|
|
5314
|
+
implDetails
|
|
5315
|
+
);
|
|
5316
|
+
for (const r of result2) {
|
|
5286
5317
|
r.source = RangePatternType.shared;
|
|
5287
5318
|
}
|
|
5288
|
-
return
|
|
5319
|
+
return result2;
|
|
5289
5320
|
}
|
|
5290
|
-
|
|
5321
|
+
let result = [];
|
|
5291
5322
|
if (rangePattern === void 0) {
|
|
5292
5323
|
rangePattern = rangePatterns.default;
|
|
5293
|
-
for (
|
|
5294
|
-
var patternPart = _c[_b];
|
|
5324
|
+
for (const patternPart of rangePattern.patternParts) {
|
|
5295
5325
|
if (patternPart.pattern === "{0}" || patternPart.pattern === "{1}") {
|
|
5296
5326
|
patternPart.pattern = pattern;
|
|
5297
5327
|
}
|
|
5298
5328
|
}
|
|
5299
5329
|
}
|
|
5300
|
-
for (
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
var z = void 0;
|
|
5330
|
+
for (const rangePatternPart of rangePattern.patternParts) {
|
|
5331
|
+
const { source, pattern: pattern2 } = rangePatternPart;
|
|
5332
|
+
let z;
|
|
5304
5333
|
if (source === RangePatternType.startRange || source === RangePatternType.shared) {
|
|
5305
5334
|
z = x;
|
|
5306
5335
|
} else {
|
|
5307
5336
|
z = y;
|
|
5308
5337
|
}
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
for (
|
|
5312
|
-
var r = partResult_1[_f];
|
|
5338
|
+
const patternParts = PartitionPattern(pattern2);
|
|
5339
|
+
let partResult = FormatDateTimePattern(dtf, patternParts, z, implDetails);
|
|
5340
|
+
for (const r of partResult) {
|
|
5313
5341
|
r.source = source;
|
|
5314
5342
|
}
|
|
5315
5343
|
result = result.concat(partResult);
|
|
@@ -5317,23 +5345,21 @@
|
|
|
5317
5345
|
return result;
|
|
5318
5346
|
}
|
|
5319
5347
|
|
|
5320
|
-
//
|
|
5348
|
+
// packages/intl-datetimeformat/src/abstract/FormatDateTimeRange.ts
|
|
5321
5349
|
function FormatDateTimeRange(dtf, x, y, implDetails) {
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
for (
|
|
5325
|
-
var part = parts_1[_i];
|
|
5350
|
+
const parts = PartitionDateTimeRangePattern(dtf, x, y, implDetails);
|
|
5351
|
+
let result = "";
|
|
5352
|
+
for (const part of parts) {
|
|
5326
5353
|
result += part.value;
|
|
5327
5354
|
}
|
|
5328
5355
|
return result;
|
|
5329
5356
|
}
|
|
5330
5357
|
|
|
5331
|
-
//
|
|
5358
|
+
// packages/intl-datetimeformat/src/abstract/FormatDateTimeRangeToParts.ts
|
|
5332
5359
|
function FormatDateTimeRangeToParts(dtf, x, y, implDetails) {
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
for (
|
|
5336
|
-
var part = parts_1[_i];
|
|
5360
|
+
const parts = PartitionDateTimeRangePattern(dtf, x, y, implDetails);
|
|
5361
|
+
const result = new Array(0);
|
|
5362
|
+
for (const part of parts) {
|
|
5337
5363
|
result.push({
|
|
5338
5364
|
type: part.type,
|
|
5339
5365
|
value: part.value,
|
|
@@ -5343,12 +5369,11 @@
|
|
|
5343
5369
|
return result;
|
|
5344
5370
|
}
|
|
5345
5371
|
|
|
5346
|
-
//
|
|
5372
|
+
// packages/intl-datetimeformat/src/abstract/FormatDateTimeToParts.ts
|
|
5347
5373
|
function FormatDateTimeToParts(dtf, x, implDetails) {
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
for (
|
|
5351
|
-
var part = parts_1[_i];
|
|
5374
|
+
const parts = PartitionDateTimePattern(dtf, x, implDetails);
|
|
5375
|
+
const result = ArrayCreate(0);
|
|
5376
|
+
for (const part of parts) {
|
|
5352
5377
|
result.push({
|
|
5353
5378
|
type: part.type,
|
|
5354
5379
|
value: part.value
|
|
@@ -5357,18 +5382,16 @@
|
|
|
5357
5382
|
return result;
|
|
5358
5383
|
}
|
|
5359
5384
|
|
|
5360
|
-
//
|
|
5385
|
+
// packages/intl-datetimeformat/src/abstract/BasicFormatMatcher.ts
|
|
5361
5386
|
function BasicFormatMatcher(options, formats) {
|
|
5362
|
-
|
|
5363
|
-
|
|
5387
|
+
let bestScore = -Infinity;
|
|
5388
|
+
let bestFormat = formats[0];
|
|
5364
5389
|
invariant(Array.isArray(formats), "formats should be a list of things");
|
|
5365
|
-
for (
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
var optionsProp = options[prop];
|
|
5371
|
-
var formatProp = format[prop];
|
|
5390
|
+
for (const format of formats) {
|
|
5391
|
+
let score = 0;
|
|
5392
|
+
for (const prop of DATE_TIME_PROPS) {
|
|
5393
|
+
const optionsProp = options[prop];
|
|
5394
|
+
const formatProp = format[prop];
|
|
5372
5395
|
if (optionsProp === void 0 && formatProp !== void 0) {
|
|
5373
5396
|
score -= additionPenalty;
|
|
5374
5397
|
} else if (optionsProp !== void 0 && formatProp === void 0) {
|
|
@@ -5406,15 +5429,18 @@
|
|
|
5406
5429
|
score -= removalPenalty;
|
|
5407
5430
|
}
|
|
5408
5431
|
} else if (optionsProp !== formatProp) {
|
|
5409
|
-
|
|
5432
|
+
let values;
|
|
5410
5433
|
if (prop === "fractionalSecondDigits") {
|
|
5411
5434
|
values = [1, 2, 3];
|
|
5412
5435
|
} else {
|
|
5413
5436
|
values = ["2-digit", "numeric", "narrow", "short", "long"];
|
|
5414
5437
|
}
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5438
|
+
const optionsPropIndex = values.indexOf(optionsProp);
|
|
5439
|
+
const formatPropIndex = values.indexOf(formatProp);
|
|
5440
|
+
const delta = Math.max(
|
|
5441
|
+
-2,
|
|
5442
|
+
Math.min(formatPropIndex - optionsPropIndex, 2)
|
|
5443
|
+
);
|
|
5418
5444
|
if (delta === 2) {
|
|
5419
5445
|
score -= longMorePenalty;
|
|
5420
5446
|
} else if (delta === 1) {
|
|
@@ -5431,14 +5457,14 @@
|
|
|
5431
5457
|
bestFormat = format;
|
|
5432
5458
|
}
|
|
5433
5459
|
}
|
|
5434
|
-
return
|
|
5460
|
+
return __spreadValues({}, bestFormat);
|
|
5435
5461
|
}
|
|
5436
5462
|
|
|
5437
|
-
//
|
|
5463
|
+
// packages/intl-datetimeformat/src/abstract/skeleton.ts
|
|
5438
5464
|
var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
5439
5465
|
var expPatternTrimmer = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
|
5440
5466
|
function matchSkeletonPattern(match2, result) {
|
|
5441
|
-
|
|
5467
|
+
const len = match2.length;
|
|
5442
5468
|
switch (match2[0]) {
|
|
5443
5469
|
case "G":
|
|
5444
5470
|
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
@@ -5513,7 +5539,9 @@
|
|
|
5513
5539
|
case "j":
|
|
5514
5540
|
case "J":
|
|
5515
5541
|
case "C":
|
|
5516
|
-
throw new RangeError(
|
|
5542
|
+
throw new RangeError(
|
|
5543
|
+
"`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead"
|
|
5544
|
+
);
|
|
5517
5545
|
case "m":
|
|
5518
5546
|
result.minute = ["numeric", "2-digit"][len - 1];
|
|
5519
5547
|
return "{minute}";
|
|
@@ -5574,15 +5602,13 @@
|
|
|
5574
5602
|
}
|
|
5575
5603
|
}
|
|
5576
5604
|
function processDateTimePattern(pattern, result) {
|
|
5577
|
-
|
|
5578
|
-
|
|
5605
|
+
const literals = [];
|
|
5606
|
+
let pattern12 = pattern.replace(/'{2}/g, "{apostrophe}").replace(/'(.*?)'/g, (_, literal) => {
|
|
5579
5607
|
literals.push(literal);
|
|
5580
|
-
return
|
|
5581
|
-
}).replace(DATE_TIME_REGEX,
|
|
5582
|
-
return matchSkeletonPattern(m, result || {});
|
|
5583
|
-
});
|
|
5608
|
+
return `$$${literals.length - 1}$$`;
|
|
5609
|
+
}).replace(DATE_TIME_REGEX, (m) => matchSkeletonPattern(m, result || {}));
|
|
5584
5610
|
if (literals.length) {
|
|
5585
|
-
pattern12 = pattern12.replace(/\$\$(\d+)\$\$/g,
|
|
5611
|
+
pattern12 = pattern12.replace(/\$\$(\d+)\$\$/g, (_, i) => {
|
|
5586
5612
|
return literals[+i];
|
|
5587
5613
|
}).replace(/\{apostrophe\}/g, "'");
|
|
5588
5614
|
}
|
|
@@ -5591,11 +5617,8 @@
|
|
|
5591
5617
|
pattern12
|
|
5592
5618
|
];
|
|
5593
5619
|
}
|
|
5594
|
-
function parseDateTimeSkeleton(skeleton, rawPattern, rangePatterns, intervalFormatFallback) {
|
|
5595
|
-
|
|
5596
|
-
rawPattern = skeleton;
|
|
5597
|
-
}
|
|
5598
|
-
var result = {
|
|
5620
|
+
function parseDateTimeSkeleton(skeleton, rawPattern = skeleton, rangePatterns, intervalFormatFallback) {
|
|
5621
|
+
const result = {
|
|
5599
5622
|
pattern: "",
|
|
5600
5623
|
pattern12: "",
|
|
5601
5624
|
skeleton,
|
|
@@ -5604,19 +5627,26 @@
|
|
|
5604
5627
|
rangePatterns12: {}
|
|
5605
5628
|
};
|
|
5606
5629
|
if (rangePatterns) {
|
|
5607
|
-
for (
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5630
|
+
for (const k in rangePatterns) {
|
|
5631
|
+
const key = skeletonTokenToTable2(k);
|
|
5632
|
+
const rawPattern2 = rangePatterns[k];
|
|
5633
|
+
const intervalResult = {
|
|
5611
5634
|
patternParts: []
|
|
5612
5635
|
};
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5636
|
+
const [pattern2, pattern122] = processDateTimePattern(
|
|
5637
|
+
rawPattern2,
|
|
5638
|
+
intervalResult
|
|
5639
|
+
);
|
|
5640
|
+
result.rangePatterns[key] = __spreadProps(__spreadValues({}, intervalResult), {
|
|
5641
|
+
patternParts: splitRangePattern(pattern2)
|
|
5642
|
+
});
|
|
5643
|
+
result.rangePatterns12[key] = __spreadProps(__spreadValues({}, intervalResult), {
|
|
5644
|
+
patternParts: splitRangePattern(pattern122)
|
|
5645
|
+
});
|
|
5616
5646
|
}
|
|
5617
5647
|
}
|
|
5618
5648
|
if (intervalFormatFallback) {
|
|
5619
|
-
|
|
5649
|
+
const patternParts = splitFallbackRangePattern(intervalFormatFallback);
|
|
5620
5650
|
result.rangePatterns.default = {
|
|
5621
5651
|
patternParts
|
|
5622
5652
|
};
|
|
@@ -5624,17 +5654,15 @@
|
|
|
5624
5654
|
patternParts
|
|
5625
5655
|
};
|
|
5626
5656
|
}
|
|
5627
|
-
skeleton.replace(DATE_TIME_REGEX,
|
|
5628
|
-
|
|
5629
|
-
});
|
|
5630
|
-
var _b = processDateTimePattern(rawPattern), pattern = _b[0], pattern12 = _b[1];
|
|
5657
|
+
skeleton.replace(DATE_TIME_REGEX, (m) => matchSkeletonPattern(m, result));
|
|
5658
|
+
const [pattern, pattern12] = processDateTimePattern(rawPattern);
|
|
5631
5659
|
result.pattern = pattern;
|
|
5632
5660
|
result.pattern12 = pattern12;
|
|
5633
5661
|
return result;
|
|
5634
5662
|
}
|
|
5635
5663
|
function splitFallbackRangePattern(pattern) {
|
|
5636
|
-
|
|
5637
|
-
return parts.map(
|
|
5664
|
+
const parts = pattern.split(/(\{[0|1]\})/g).filter(Boolean);
|
|
5665
|
+
return parts.map((pattern2) => {
|
|
5638
5666
|
switch (pattern2) {
|
|
5639
5667
|
case "{0}":
|
|
5640
5668
|
return {
|
|
@@ -5655,10 +5683,10 @@
|
|
|
5655
5683
|
});
|
|
5656
5684
|
}
|
|
5657
5685
|
function splitRangePattern(pattern) {
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5686
|
+
const PART_REGEX = /\{(.*?)\}/g;
|
|
5687
|
+
const parts = {};
|
|
5688
|
+
let match2;
|
|
5689
|
+
let splitIndex = 0;
|
|
5662
5690
|
while (match2 = PART_REGEX.exec(pattern)) {
|
|
5663
5691
|
if (!(match2[0] in parts)) {
|
|
5664
5692
|
parts[match2[0]] = match2.index;
|
|
@@ -5687,21 +5715,20 @@
|
|
|
5687
5715
|
];
|
|
5688
5716
|
}
|
|
5689
5717
|
|
|
5690
|
-
//
|
|
5718
|
+
// packages/intl-datetimeformat/src/abstract/BestFitFormatMatcher.ts
|
|
5691
5719
|
function isNumericType(t) {
|
|
5692
5720
|
return t === "numeric" || t === "2-digit";
|
|
5693
5721
|
}
|
|
5694
5722
|
function bestFitFormatMatcherScore(options, format) {
|
|
5695
|
-
|
|
5723
|
+
let score = 0;
|
|
5696
5724
|
if (options.hour12 && !format.hour12) {
|
|
5697
5725
|
score -= removalPenalty;
|
|
5698
5726
|
} else if (!options.hour12 && format.hour12) {
|
|
5699
5727
|
score -= additionPenalty;
|
|
5700
5728
|
}
|
|
5701
|
-
for (
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
var formatProp = format[prop];
|
|
5729
|
+
for (const prop of DATE_TIME_PROPS) {
|
|
5730
|
+
const optionsProp = options[prop];
|
|
5731
|
+
const formatProp = format[prop];
|
|
5705
5732
|
if (optionsProp === void 0 && formatProp !== void 0) {
|
|
5706
5733
|
score -= additionPenalty;
|
|
5707
5734
|
} else if (optionsProp !== void 0 && formatProp === void 0) {
|
|
@@ -5710,10 +5737,13 @@
|
|
|
5710
5737
|
if (isNumericType(optionsProp) !== isNumericType(formatProp)) {
|
|
5711
5738
|
score -= differentNumericTypePenalty;
|
|
5712
5739
|
} else {
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5740
|
+
const values = ["2-digit", "numeric", "narrow", "short", "long"];
|
|
5741
|
+
const optionsPropIndex = values.indexOf(optionsProp);
|
|
5742
|
+
const formatPropIndex = values.indexOf(formatProp);
|
|
5743
|
+
const delta = Math.max(
|
|
5744
|
+
-2,
|
|
5745
|
+
Math.min(formatPropIndex - optionsPropIndex, 2)
|
|
5746
|
+
);
|
|
5717
5747
|
if (delta === 2) {
|
|
5718
5748
|
score -= longMorePenalty;
|
|
5719
5749
|
} else if (delta === 1) {
|
|
@@ -5729,24 +5759,23 @@
|
|
|
5729
5759
|
return score;
|
|
5730
5760
|
}
|
|
5731
5761
|
function BestFitFormatMatcher(options, formats) {
|
|
5732
|
-
|
|
5733
|
-
|
|
5762
|
+
let bestScore = -Infinity;
|
|
5763
|
+
let bestFormat = formats[0];
|
|
5734
5764
|
invariant(Array.isArray(formats), "formats should be a list of things");
|
|
5735
|
-
for (
|
|
5736
|
-
|
|
5737
|
-
var score = bestFitFormatMatcherScore(options, format);
|
|
5765
|
+
for (const format of formats) {
|
|
5766
|
+
const score = bestFitFormatMatcherScore(options, format);
|
|
5738
5767
|
if (score > bestScore) {
|
|
5739
5768
|
bestScore = score;
|
|
5740
5769
|
bestFormat = format;
|
|
5741
5770
|
}
|
|
5742
5771
|
}
|
|
5743
|
-
|
|
5744
|
-
|
|
5772
|
+
const skeletonFormat = __spreadValues({}, bestFormat);
|
|
5773
|
+
const patternFormat = { rawPattern: bestFormat.rawPattern };
|
|
5745
5774
|
processDateTimePattern(bestFormat.rawPattern, patternFormat);
|
|
5746
|
-
for (
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5775
|
+
for (const prop in skeletonFormat) {
|
|
5776
|
+
const skeletonValue = skeletonFormat[prop];
|
|
5777
|
+
const patternValue = patternFormat[prop];
|
|
5778
|
+
const requestedValue = options[prop];
|
|
5750
5779
|
if (prop === "minute" || prop === "second") {
|
|
5751
5780
|
continue;
|
|
5752
5781
|
}
|
|
@@ -5769,34 +5798,40 @@
|
|
|
5769
5798
|
return patternFormat;
|
|
5770
5799
|
}
|
|
5771
5800
|
|
|
5772
|
-
//
|
|
5801
|
+
// packages/intl-datetimeformat/src/abstract/DateTimeStyleFormat.ts
|
|
5773
5802
|
function DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData) {
|
|
5774
|
-
|
|
5803
|
+
let dateFormat, timeFormat;
|
|
5775
5804
|
if (timeStyle !== void 0) {
|
|
5776
|
-
invariant(
|
|
5805
|
+
invariant(
|
|
5806
|
+
timeStyle === "full" || timeStyle === "long" || timeStyle === "medium" || timeStyle === "short",
|
|
5807
|
+
"invalid timeStyle"
|
|
5808
|
+
);
|
|
5777
5809
|
timeFormat = dataLocaleData.timeFormat[timeStyle];
|
|
5778
5810
|
}
|
|
5779
5811
|
if (dateStyle !== void 0) {
|
|
5780
|
-
invariant(
|
|
5812
|
+
invariant(
|
|
5813
|
+
dateStyle === "full" || dateStyle === "long" || dateStyle === "medium" || dateStyle === "short",
|
|
5814
|
+
"invalid dateStyle"
|
|
5815
|
+
);
|
|
5781
5816
|
dateFormat = dataLocaleData.dateFormat[dateStyle];
|
|
5782
5817
|
}
|
|
5783
5818
|
if (dateStyle !== void 0 && timeStyle !== void 0) {
|
|
5784
|
-
|
|
5785
|
-
for (
|
|
5819
|
+
const format = {};
|
|
5820
|
+
for (const field in dateFormat) {
|
|
5786
5821
|
if (field !== "pattern") {
|
|
5787
5822
|
format[field] = dateFormat[field];
|
|
5788
5823
|
}
|
|
5789
5824
|
}
|
|
5790
|
-
for (
|
|
5825
|
+
for (const field in timeFormat) {
|
|
5791
5826
|
if (field !== "pattern" && field !== "pattern12") {
|
|
5792
5827
|
format[field] = timeFormat[field];
|
|
5793
5828
|
}
|
|
5794
5829
|
}
|
|
5795
|
-
|
|
5796
|
-
|
|
5830
|
+
const connector = dataLocaleData.dateTimeFormat[dateStyle];
|
|
5831
|
+
const pattern = connector.replace("{0}", timeFormat.pattern).replace("{1}", dateFormat.pattern);
|
|
5797
5832
|
format.pattern = pattern;
|
|
5798
5833
|
if ("pattern12" in timeFormat) {
|
|
5799
|
-
|
|
5834
|
+
const pattern12 = connector.replace("{0}", timeFormat.pattern12).replace("{1}", dateFormat.pattern);
|
|
5800
5835
|
format.pattern12 = pattern12;
|
|
5801
5836
|
}
|
|
5802
5837
|
return format;
|
|
@@ -5808,7 +5843,7 @@
|
|
|
5808
5843
|
return dateFormat;
|
|
5809
5844
|
}
|
|
5810
5845
|
|
|
5811
|
-
//
|
|
5846
|
+
// packages/intl-datetimeformat/src/abstract/ToDateTimeOptions.ts
|
|
5812
5847
|
function ToDateTimeOptions(options, required, defaults) {
|
|
5813
5848
|
if (options === void 0) {
|
|
5814
5849
|
options = null;
|
|
@@ -5816,26 +5851,24 @@
|
|
|
5816
5851
|
options = ToObject(options);
|
|
5817
5852
|
}
|
|
5818
5853
|
options = Object.create(options);
|
|
5819
|
-
|
|
5854
|
+
let needDefaults = true;
|
|
5820
5855
|
if (required === "date" || required === "any") {
|
|
5821
|
-
for (
|
|
5822
|
-
|
|
5823
|
-
var value = options[prop];
|
|
5856
|
+
for (const prop of ["weekday", "year", "month", "day"]) {
|
|
5857
|
+
const value = options[prop];
|
|
5824
5858
|
if (value !== void 0) {
|
|
5825
5859
|
needDefaults = false;
|
|
5826
5860
|
}
|
|
5827
5861
|
}
|
|
5828
5862
|
}
|
|
5829
5863
|
if (required === "time" || required === "any") {
|
|
5830
|
-
for (
|
|
5864
|
+
for (const prop of [
|
|
5831
5865
|
"dayPeriod",
|
|
5832
5866
|
"hour",
|
|
5833
5867
|
"minute",
|
|
5834
5868
|
"second",
|
|
5835
5869
|
"fractionalSecondDigits"
|
|
5836
|
-
]
|
|
5837
|
-
|
|
5838
|
-
var value = options[prop];
|
|
5870
|
+
]) {
|
|
5871
|
+
const value = options[prop];
|
|
5839
5872
|
if (value !== void 0) {
|
|
5840
5873
|
needDefaults = false;
|
|
5841
5874
|
}
|
|
@@ -5845,31 +5878,32 @@
|
|
|
5845
5878
|
needDefaults = false;
|
|
5846
5879
|
}
|
|
5847
5880
|
if (required === "date" && options.timeStyle) {
|
|
5848
|
-
throw new TypeError(
|
|
5881
|
+
throw new TypeError(
|
|
5882
|
+
"Intl.DateTimeFormat date was required but timeStyle was included"
|
|
5883
|
+
);
|
|
5849
5884
|
}
|
|
5850
5885
|
if (required === "time" && options.dateStyle) {
|
|
5851
|
-
throw new TypeError(
|
|
5886
|
+
throw new TypeError(
|
|
5887
|
+
"Intl.DateTimeFormat time was required but dateStyle was included"
|
|
5888
|
+
);
|
|
5852
5889
|
}
|
|
5853
5890
|
if (needDefaults && (defaults === "date" || defaults === "all")) {
|
|
5854
|
-
for (
|
|
5855
|
-
var prop = _e[_d];
|
|
5891
|
+
for (const prop of ["year", "month", "day"]) {
|
|
5856
5892
|
options[prop] = "numeric";
|
|
5857
5893
|
}
|
|
5858
5894
|
}
|
|
5859
5895
|
if (needDefaults && (defaults === "time" || defaults === "all")) {
|
|
5860
|
-
for (
|
|
5861
|
-
var prop = _g[_f];
|
|
5896
|
+
for (const prop of ["hour", "minute", "second"]) {
|
|
5862
5897
|
options[prop] = "numeric";
|
|
5863
5898
|
}
|
|
5864
5899
|
}
|
|
5865
5900
|
return options;
|
|
5866
5901
|
}
|
|
5867
5902
|
|
|
5868
|
-
//
|
|
5903
|
+
// packages/intl-datetimeformat/src/abstract/InitializeDateTimeFormat.ts
|
|
5869
5904
|
function isTimeRelated(opt) {
|
|
5870
|
-
for (
|
|
5871
|
-
|
|
5872
|
-
var value = opt[prop];
|
|
5905
|
+
for (const prop of ["hour", "minute", "second"]) {
|
|
5906
|
+
const value = opt[prop];
|
|
5873
5907
|
if (value !== void 0) {
|
|
5874
5908
|
return true;
|
|
5875
5909
|
}
|
|
@@ -5899,39 +5933,72 @@
|
|
|
5899
5933
|
return hc;
|
|
5900
5934
|
}
|
|
5901
5935
|
var TYPE_REGEX = /^[a-z0-9]{3,8}$/i;
|
|
5902
|
-
function InitializeDateTimeFormat(dtf, locales, opts,
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5936
|
+
function InitializeDateTimeFormat(dtf, locales, opts, {
|
|
5937
|
+
getInternalSlots: getInternalSlots2,
|
|
5938
|
+
availableLocales,
|
|
5939
|
+
localeData,
|
|
5940
|
+
getDefaultLocale,
|
|
5941
|
+
getDefaultTimeZone,
|
|
5942
|
+
relevantExtensionKeys,
|
|
5943
|
+
tzData,
|
|
5944
|
+
uppercaseLinks
|
|
5945
|
+
}) {
|
|
5946
|
+
const requestedLocales = CanonicalizeLocaleList(locales);
|
|
5947
|
+
const options = ToDateTimeOptions(opts, "any", "date");
|
|
5948
|
+
let opt = /* @__PURE__ */ Object.create(null);
|
|
5949
|
+
let matcher = GetOption(
|
|
5950
|
+
options,
|
|
5951
|
+
"localeMatcher",
|
|
5952
|
+
"string",
|
|
5953
|
+
["lookup", "best fit"],
|
|
5954
|
+
"best fit"
|
|
5955
|
+
);
|
|
5908
5956
|
opt.localeMatcher = matcher;
|
|
5909
|
-
|
|
5957
|
+
let calendar = GetOption(options, "calendar", "string", void 0, void 0);
|
|
5910
5958
|
if (calendar !== void 0 && !TYPE_REGEX.test(calendar)) {
|
|
5911
5959
|
throw new RangeError("Malformed calendar");
|
|
5912
5960
|
}
|
|
5913
|
-
|
|
5961
|
+
const internalSlots = getInternalSlots2(dtf);
|
|
5914
5962
|
opt.ca = calendar;
|
|
5915
|
-
|
|
5963
|
+
const numberingSystem = GetOption(
|
|
5964
|
+
options,
|
|
5965
|
+
"numberingSystem",
|
|
5966
|
+
"string",
|
|
5967
|
+
void 0,
|
|
5968
|
+
void 0
|
|
5969
|
+
);
|
|
5916
5970
|
if (numberingSystem !== void 0 && !TYPE_REGEX.test(numberingSystem)) {
|
|
5917
5971
|
throw new RangeError("Malformed numbering system");
|
|
5918
5972
|
}
|
|
5919
5973
|
opt.nu = numberingSystem;
|
|
5920
|
-
|
|
5921
|
-
|
|
5974
|
+
const hour12 = GetOption(options, "hour12", "boolean", void 0, void 0);
|
|
5975
|
+
let hourCycle = GetOption(
|
|
5976
|
+
options,
|
|
5977
|
+
"hourCycle",
|
|
5978
|
+
"string",
|
|
5979
|
+
["h11", "h12", "h23", "h24"],
|
|
5980
|
+
void 0
|
|
5981
|
+
);
|
|
5922
5982
|
if (hour12 !== void 0) {
|
|
5923
5983
|
hourCycle = null;
|
|
5924
5984
|
}
|
|
5925
5985
|
opt.hc = hourCycle;
|
|
5926
|
-
|
|
5986
|
+
const r = ResolveLocale(
|
|
5987
|
+
availableLocales,
|
|
5988
|
+
requestedLocales,
|
|
5989
|
+
opt,
|
|
5990
|
+
relevantExtensionKeys,
|
|
5991
|
+
localeData,
|
|
5992
|
+
getDefaultLocale
|
|
5993
|
+
);
|
|
5927
5994
|
internalSlots.locale = r.locale;
|
|
5928
5995
|
calendar = r.ca;
|
|
5929
5996
|
internalSlots.calendar = calendar;
|
|
5930
5997
|
internalSlots.hourCycle = r.hc;
|
|
5931
5998
|
internalSlots.numberingSystem = r.nu;
|
|
5932
|
-
|
|
5999
|
+
const { dataLocale } = r;
|
|
5933
6000
|
internalSlots.dataLocale = dataLocale;
|
|
5934
|
-
|
|
6001
|
+
let { timeZone } = options;
|
|
5935
6002
|
if (timeZone !== void 0) {
|
|
5936
6003
|
timeZone = String(timeZone);
|
|
5937
6004
|
if (!IsValidTimeZoneName(timeZone, {
|
|
@@ -5949,66 +6016,157 @@
|
|
|
5949
6016
|
}
|
|
5950
6017
|
internalSlots.timeZone = timeZone;
|
|
5951
6018
|
opt = /* @__PURE__ */ Object.create(null);
|
|
5952
|
-
opt.weekday = GetOption(
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
opt.
|
|
5960
|
-
|
|
5961
|
-
"
|
|
5962
|
-
"
|
|
5963
|
-
"
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
6019
|
+
opt.weekday = GetOption(
|
|
6020
|
+
options,
|
|
6021
|
+
"weekday",
|
|
6022
|
+
"string",
|
|
6023
|
+
["narrow", "short", "long"],
|
|
6024
|
+
void 0
|
|
6025
|
+
);
|
|
6026
|
+
opt.era = GetOption(
|
|
6027
|
+
options,
|
|
6028
|
+
"era",
|
|
6029
|
+
"string",
|
|
6030
|
+
["narrow", "short", "long"],
|
|
6031
|
+
void 0
|
|
6032
|
+
);
|
|
6033
|
+
opt.year = GetOption(
|
|
6034
|
+
options,
|
|
6035
|
+
"year",
|
|
6036
|
+
"string",
|
|
6037
|
+
["2-digit", "numeric"],
|
|
6038
|
+
void 0
|
|
6039
|
+
);
|
|
6040
|
+
opt.month = GetOption(
|
|
6041
|
+
options,
|
|
6042
|
+
"month",
|
|
6043
|
+
"string",
|
|
6044
|
+
["2-digit", "numeric", "narrow", "short", "long"],
|
|
6045
|
+
void 0
|
|
6046
|
+
);
|
|
6047
|
+
opt.day = GetOption(
|
|
6048
|
+
options,
|
|
6049
|
+
"day",
|
|
6050
|
+
"string",
|
|
6051
|
+
["2-digit", "numeric"],
|
|
6052
|
+
void 0
|
|
6053
|
+
);
|
|
6054
|
+
opt.hour = GetOption(
|
|
6055
|
+
options,
|
|
6056
|
+
"hour",
|
|
6057
|
+
"string",
|
|
6058
|
+
["2-digit", "numeric"],
|
|
6059
|
+
void 0
|
|
6060
|
+
);
|
|
6061
|
+
opt.minute = GetOption(
|
|
6062
|
+
options,
|
|
6063
|
+
"minute",
|
|
6064
|
+
"string",
|
|
6065
|
+
["2-digit", "numeric"],
|
|
6066
|
+
void 0
|
|
6067
|
+
);
|
|
6068
|
+
opt.second = GetOption(
|
|
6069
|
+
options,
|
|
6070
|
+
"second",
|
|
6071
|
+
"string",
|
|
6072
|
+
["2-digit", "numeric"],
|
|
6073
|
+
void 0
|
|
6074
|
+
);
|
|
6075
|
+
opt.timeZoneName = GetOption(
|
|
6076
|
+
options,
|
|
6077
|
+
"timeZoneName",
|
|
6078
|
+
"string",
|
|
6079
|
+
[
|
|
6080
|
+
"long",
|
|
6081
|
+
"short",
|
|
6082
|
+
"longOffset",
|
|
6083
|
+
"shortOffset",
|
|
6084
|
+
"longGeneric",
|
|
6085
|
+
"shortGeneric"
|
|
6086
|
+
],
|
|
6087
|
+
void 0
|
|
6088
|
+
);
|
|
6089
|
+
opt.fractionalSecondDigits = GetNumberOption(
|
|
6090
|
+
options,
|
|
6091
|
+
"fractionalSecondDigits",
|
|
6092
|
+
1,
|
|
6093
|
+
3,
|
|
6094
|
+
void 0
|
|
6095
|
+
);
|
|
6096
|
+
const dataLocaleData = localeData[dataLocale];
|
|
6097
|
+
invariant(!!dataLocaleData, `Missing locale data for ${dataLocale}`);
|
|
6098
|
+
const formats = dataLocaleData.formats[calendar];
|
|
5972
6099
|
if (!formats) {
|
|
5973
|
-
throw new RangeError(
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
6100
|
+
throw new RangeError(
|
|
6101
|
+
`Calendar "${calendar}" is not supported. Try setting "calendar" to 1 of the following: ${Object.keys(
|
|
6102
|
+
dataLocaleData.formats
|
|
6103
|
+
).join(", ")}`
|
|
6104
|
+
);
|
|
6105
|
+
}
|
|
6106
|
+
const formatMatcher = GetOption(
|
|
6107
|
+
options,
|
|
6108
|
+
"formatMatcher",
|
|
6109
|
+
"string",
|
|
6110
|
+
["basic", "best fit"],
|
|
6111
|
+
"best fit"
|
|
6112
|
+
);
|
|
6113
|
+
const dateStyle = GetOption(
|
|
6114
|
+
options,
|
|
6115
|
+
"dateStyle",
|
|
6116
|
+
"string",
|
|
6117
|
+
["full", "long", "medium", "short"],
|
|
6118
|
+
void 0
|
|
6119
|
+
);
|
|
5977
6120
|
internalSlots.dateStyle = dateStyle;
|
|
5978
|
-
|
|
6121
|
+
const timeStyle = GetOption(
|
|
6122
|
+
options,
|
|
6123
|
+
"timeStyle",
|
|
6124
|
+
"string",
|
|
6125
|
+
["full", "long", "medium", "short"],
|
|
6126
|
+
void 0
|
|
6127
|
+
);
|
|
5979
6128
|
internalSlots.timeStyle = timeStyle;
|
|
5980
|
-
|
|
6129
|
+
let bestFormat;
|
|
5981
6130
|
if (dateStyle === void 0 && timeStyle === void 0) {
|
|
5982
6131
|
if (formatMatcher === "basic") {
|
|
5983
6132
|
bestFormat = BasicFormatMatcher(opt, formats);
|
|
5984
6133
|
} else {
|
|
5985
6134
|
if (isTimeRelated(opt)) {
|
|
5986
|
-
|
|
6135
|
+
const hc = resolveHourCycle(
|
|
6136
|
+
internalSlots.hourCycle,
|
|
6137
|
+
dataLocaleData.hourCycle,
|
|
6138
|
+
hour12
|
|
6139
|
+
);
|
|
5987
6140
|
opt.hour12 = hc === "h11" || hc === "h12";
|
|
5988
6141
|
}
|
|
5989
6142
|
bestFormat = BestFitFormatMatcher(opt, formats);
|
|
5990
6143
|
}
|
|
5991
6144
|
} else {
|
|
5992
|
-
for (
|
|
5993
|
-
|
|
5994
|
-
var p = opt[prop];
|
|
6145
|
+
for (const prop of DATE_TIME_PROPS) {
|
|
6146
|
+
const p = opt[prop];
|
|
5995
6147
|
if (p !== void 0) {
|
|
5996
|
-
throw new TypeError(
|
|
6148
|
+
throw new TypeError(
|
|
6149
|
+
`Intl.DateTimeFormat can't set option ${prop} when ${dateStyle ? "dateStyle" : "timeStyle"} is used`
|
|
6150
|
+
);
|
|
5997
6151
|
}
|
|
5998
6152
|
}
|
|
5999
6153
|
bestFormat = DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData);
|
|
6000
6154
|
}
|
|
6001
6155
|
internalSlots.format = bestFormat;
|
|
6002
|
-
for (
|
|
6003
|
-
|
|
6156
|
+
for (const prop in opt) {
|
|
6157
|
+
const p = bestFormat[prop];
|
|
6004
6158
|
if (p !== void 0) {
|
|
6005
6159
|
internalSlots[prop] = p;
|
|
6006
6160
|
}
|
|
6007
6161
|
}
|
|
6008
|
-
|
|
6009
|
-
|
|
6162
|
+
let pattern;
|
|
6163
|
+
let rangePatterns;
|
|
6010
6164
|
if (internalSlots.hour !== void 0) {
|
|
6011
|
-
|
|
6165
|
+
const hc = resolveHourCycle(
|
|
6166
|
+
internalSlots.hourCycle,
|
|
6167
|
+
dataLocaleData.hourCycle,
|
|
6168
|
+
hour12
|
|
6169
|
+
);
|
|
6012
6170
|
internalSlots.hourCycle = hc;
|
|
6013
6171
|
if (hc === "h11" || hc === "h12") {
|
|
6014
6172
|
pattern = bestFormat.pattern12;
|
|
@@ -6027,7 +6185,7 @@
|
|
|
6027
6185
|
return dtf;
|
|
6028
6186
|
}
|
|
6029
6187
|
|
|
6030
|
-
//
|
|
6188
|
+
// packages/intl-datetimeformat/src/data/links.ts
|
|
6031
6189
|
var links_default = {
|
|
6032
6190
|
"Africa/Accra": "Africa/Abidjan",
|
|
6033
6191
|
"Africa/Addis_Ababa": "Africa/Nairobi",
|
|
@@ -6122,6 +6280,7 @@
|
|
|
6122
6280
|
"Asia/Bahrain": "Asia/Qatar",
|
|
6123
6281
|
"Asia/Brunei": "Asia/Kuching",
|
|
6124
6282
|
"Asia/Calcutta": "Asia/Kolkata",
|
|
6283
|
+
"Asia/Choibalsan": "Asia/Ulaanbaatar",
|
|
6125
6284
|
"Asia/Chongqing": "Asia/Shanghai",
|
|
6126
6285
|
"Asia/Chungking": "Asia/Shanghai",
|
|
6127
6286
|
"Asia/Dacca": "Asia/Dhaka",
|
|
@@ -6161,6 +6320,8 @@
|
|
|
6161
6320
|
"Brazil/DeNoronha": "America/Noronha",
|
|
6162
6321
|
"Brazil/East": "America/Sao_Paulo",
|
|
6163
6322
|
"Brazil/West": "America/Manaus",
|
|
6323
|
+
"CET": "Europe/Brussels",
|
|
6324
|
+
"CST6CDT": "America/Chicago",
|
|
6164
6325
|
"Canada/Atlantic": "America/Halifax",
|
|
6165
6326
|
"Canada/Central": "America/Winnipeg",
|
|
6166
6327
|
"Canada/Eastern": "America/Toronto",
|
|
@@ -6172,6 +6333,9 @@
|
|
|
6172
6333
|
"Chile/Continental": "America/Santiago",
|
|
6173
6334
|
"Chile/EasterIsland": "Pacific/Easter",
|
|
6174
6335
|
"Cuba": "America/Havana",
|
|
6336
|
+
"EET": "Europe/Athens",
|
|
6337
|
+
"EST": "America/Panama",
|
|
6338
|
+
"EST5EDT": "America/New_York",
|
|
6175
6339
|
"Egypt": "Africa/Cairo",
|
|
6176
6340
|
"Eire": "Europe/Dublin",
|
|
6177
6341
|
"Etc/GMT+0": "Etc/GMT",
|
|
@@ -6213,6 +6377,7 @@
|
|
|
6213
6377
|
"GMT-0": "Etc/GMT",
|
|
6214
6378
|
"GMT0": "Etc/GMT",
|
|
6215
6379
|
"Greenwich": "Etc/GMT",
|
|
6380
|
+
"HST": "Pacific/Honolulu",
|
|
6216
6381
|
"Hongkong": "Asia/Hong_Kong",
|
|
6217
6382
|
"Iceland": "Africa/Abidjan",
|
|
6218
6383
|
"Indian/Antananarivo": "Africa/Nairobi",
|
|
@@ -6229,6 +6394,9 @@
|
|
|
6229
6394
|
"Japan": "Asia/Tokyo",
|
|
6230
6395
|
"Kwajalein": "Pacific/Kwajalein",
|
|
6231
6396
|
"Libya": "Africa/Tripoli",
|
|
6397
|
+
"MET": "Europe/Brussels",
|
|
6398
|
+
"MST": "America/Phoenix",
|
|
6399
|
+
"MST7MDT": "America/Denver",
|
|
6232
6400
|
"Mexico/BajaNorte": "America/Tijuana",
|
|
6233
6401
|
"Mexico/BajaSur": "America/Mazatlan",
|
|
6234
6402
|
"Mexico/General": "America/Mexico_City",
|
|
@@ -6236,6 +6404,7 @@
|
|
|
6236
6404
|
"NZ-CHAT": "Pacific/Chatham",
|
|
6237
6405
|
"Navajo": "America/Denver",
|
|
6238
6406
|
"PRC": "Asia/Shanghai",
|
|
6407
|
+
"PST8PDT": "America/Los_Angeles",
|
|
6239
6408
|
"Pacific/Chuuk": "Pacific/Port_Moresby",
|
|
6240
6409
|
"Pacific/Enderbury": "Pacific/Kanton",
|
|
6241
6410
|
"Pacific/Funafuti": "Pacific/Tarawa",
|
|
@@ -6272,13 +6441,14 @@
|
|
|
6272
6441
|
"UTC": "Etc/UTC",
|
|
6273
6442
|
"Universal": "Etc/UTC",
|
|
6274
6443
|
"W-SU": "Europe/Moscow",
|
|
6444
|
+
"WET": "Europe/Lisbon",
|
|
6275
6445
|
"Zulu": "Etc/UTC"
|
|
6276
6446
|
};
|
|
6277
6447
|
|
|
6278
|
-
//
|
|
6448
|
+
// packages/intl-datetimeformat/src/get_internal_slots.ts
|
|
6279
6449
|
var internalSlotMap = /* @__PURE__ */ new WeakMap();
|
|
6280
6450
|
function getInternalSlots(x) {
|
|
6281
|
-
|
|
6451
|
+
let internalSlots = internalSlotMap.get(x);
|
|
6282
6452
|
if (!internalSlots) {
|
|
6283
6453
|
internalSlots = /* @__PURE__ */ Object.create(null);
|
|
6284
6454
|
internalSlotMap.set(x, internalSlots);
|
|
@@ -6286,37 +6456,32 @@
|
|
|
6286
6456
|
return internalSlots;
|
|
6287
6457
|
}
|
|
6288
6458
|
|
|
6289
|
-
//
|
|
6459
|
+
// packages/intl-datetimeformat/src/packer.ts
|
|
6290
6460
|
function unpack(data2) {
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
}
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
var ts = _a2[0], abbrvIndex = _a2[1], offsetIndex = _a2[2], dst = _a2[3];
|
|
6304
|
-
return [
|
|
6305
|
-
ts === "" ? -Infinity : parseInt(ts, 36),
|
|
6306
|
-
abbrvs[+abbrvIndex],
|
|
6307
|
-
offsets[+offsetIndex],
|
|
6308
|
-
dst === "1"
|
|
6309
|
-
];
|
|
6310
|
-
});
|
|
6461
|
+
const abbrvs = data2.abbrvs.split("|");
|
|
6462
|
+
const offsets = data2.offsets.split("|").map((n) => parseInt(n, 36));
|
|
6463
|
+
const packedZones = data2.zones;
|
|
6464
|
+
const zones = {};
|
|
6465
|
+
for (const d of packedZones) {
|
|
6466
|
+
const [zone, ...zoneData] = d.split("|");
|
|
6467
|
+
zones[zone] = zoneData.map((z) => z.split(",")).map(([ts, abbrvIndex, offsetIndex, dst]) => [
|
|
6468
|
+
ts === "" ? -Infinity : parseInt(ts, 36),
|
|
6469
|
+
abbrvs[+abbrvIndex],
|
|
6470
|
+
offsets[+offsetIndex],
|
|
6471
|
+
dst === "1"
|
|
6472
|
+
]);
|
|
6311
6473
|
}
|
|
6312
6474
|
return zones;
|
|
6313
6475
|
}
|
|
6314
6476
|
|
|
6315
|
-
//
|
|
6316
|
-
var UPPERCASED_LINKS = Object.keys(links_default).reduce(
|
|
6317
|
-
all
|
|
6318
|
-
|
|
6319
|
-
|
|
6477
|
+
// packages/intl-datetimeformat/src/core.ts
|
|
6478
|
+
var UPPERCASED_LINKS = Object.keys(links_default).reduce(
|
|
6479
|
+
(all, l) => {
|
|
6480
|
+
all[l.toUpperCase()] = links_default[l];
|
|
6481
|
+
return all;
|
|
6482
|
+
},
|
|
6483
|
+
{}
|
|
6484
|
+
);
|
|
6320
6485
|
var RESOLVED_OPTIONS_KEYS = [
|
|
6321
6486
|
"locale",
|
|
6322
6487
|
"calendar",
|
|
@@ -6338,16 +6503,18 @@
|
|
|
6338
6503
|
var formatDescriptor = {
|
|
6339
6504
|
enumerable: false,
|
|
6340
6505
|
configurable: true,
|
|
6341
|
-
get
|
|
6342
|
-
if (typeof this !== "object" || !OrdinaryHasInstance(
|
|
6343
|
-
throw TypeError(
|
|
6506
|
+
get() {
|
|
6507
|
+
if (typeof this !== "object" || !OrdinaryHasInstance(DateTimeFormat4, this)) {
|
|
6508
|
+
throw TypeError(
|
|
6509
|
+
"Intl.DateTimeFormat format property accessor called on incompatible receiver"
|
|
6510
|
+
);
|
|
6344
6511
|
}
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6512
|
+
const internalSlots = getInternalSlots(this);
|
|
6513
|
+
const dtf = this;
|
|
6514
|
+
let boundFormat = internalSlots.boundFormat;
|
|
6348
6515
|
if (boundFormat === void 0) {
|
|
6349
|
-
boundFormat =
|
|
6350
|
-
|
|
6516
|
+
boundFormat = (date) => {
|
|
6517
|
+
let x;
|
|
6351
6518
|
if (date === void 0) {
|
|
6352
6519
|
x = Date.now();
|
|
6353
6520
|
} else {
|
|
@@ -6355,9 +6522,9 @@
|
|
|
6355
6522
|
}
|
|
6356
6523
|
return FormatDateTime(dtf, x, {
|
|
6357
6524
|
getInternalSlots,
|
|
6358
|
-
localeData:
|
|
6359
|
-
tzData:
|
|
6360
|
-
getDefaultTimeZone:
|
|
6525
|
+
localeData: DateTimeFormat4.localeData,
|
|
6526
|
+
tzData: DateTimeFormat4.tzData,
|
|
6527
|
+
getDefaultTimeZone: DateTimeFormat4.getDefaultTimeZone
|
|
6361
6528
|
});
|
|
6362
6529
|
};
|
|
6363
6530
|
try {
|
|
@@ -6383,42 +6550,50 @@
|
|
|
6383
6550
|
});
|
|
6384
6551
|
} catch (e) {
|
|
6385
6552
|
}
|
|
6386
|
-
var
|
|
6387
|
-
if (!this || !OrdinaryHasInstance(
|
|
6388
|
-
return new
|
|
6553
|
+
var DateTimeFormat4 = function(locales, options) {
|
|
6554
|
+
if (!this || !OrdinaryHasInstance(DateTimeFormat4, this)) {
|
|
6555
|
+
return new DateTimeFormat4(locales, options);
|
|
6389
6556
|
}
|
|
6390
6557
|
InitializeDateTimeFormat(this, locales, options, {
|
|
6391
|
-
tzData:
|
|
6558
|
+
tzData: DateTimeFormat4.tzData,
|
|
6392
6559
|
uppercaseLinks: UPPERCASED_LINKS,
|
|
6393
|
-
availableLocales:
|
|
6394
|
-
relevantExtensionKeys:
|
|
6395
|
-
getDefaultLocale:
|
|
6396
|
-
getDefaultTimeZone:
|
|
6560
|
+
availableLocales: DateTimeFormat4.availableLocales,
|
|
6561
|
+
relevantExtensionKeys: DateTimeFormat4.relevantExtensionKeys,
|
|
6562
|
+
getDefaultLocale: DateTimeFormat4.getDefaultLocale,
|
|
6563
|
+
getDefaultTimeZone: DateTimeFormat4.getDefaultTimeZone,
|
|
6397
6564
|
getInternalSlots,
|
|
6398
|
-
localeData:
|
|
6565
|
+
localeData: DateTimeFormat4.localeData
|
|
6399
6566
|
});
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
invariant(
|
|
6567
|
+
const internalSlots = getInternalSlots(this);
|
|
6568
|
+
const dataLocale = internalSlots.dataLocale;
|
|
6569
|
+
const dataLocaleData = DateTimeFormat4.localeData[dataLocale];
|
|
6570
|
+
invariant(
|
|
6571
|
+
dataLocaleData !== void 0,
|
|
6572
|
+
`Cannot load locale-dependent data for ${dataLocale}.`
|
|
6573
|
+
);
|
|
6404
6574
|
};
|
|
6405
|
-
defineProperty(
|
|
6575
|
+
defineProperty(DateTimeFormat4, "supportedLocalesOf", {
|
|
6406
6576
|
value: function supportedLocalesOf(locales, options) {
|
|
6407
|
-
return SupportedLocales(
|
|
6577
|
+
return SupportedLocales(
|
|
6578
|
+
DateTimeFormat4.availableLocales,
|
|
6579
|
+
CanonicalizeLocaleList(locales),
|
|
6580
|
+
options
|
|
6581
|
+
);
|
|
6408
6582
|
}
|
|
6409
6583
|
});
|
|
6410
|
-
defineProperty(
|
|
6584
|
+
defineProperty(DateTimeFormat4.prototype, "resolvedOptions", {
|
|
6411
6585
|
value: function resolvedOptions() {
|
|
6412
|
-
if (typeof this !== "object" || !OrdinaryHasInstance(
|
|
6413
|
-
throw TypeError(
|
|
6586
|
+
if (typeof this !== "object" || !OrdinaryHasInstance(DateTimeFormat4, this)) {
|
|
6587
|
+
throw TypeError(
|
|
6588
|
+
"Method Intl.DateTimeFormat.prototype.resolvedOptions called on incompatible receiver"
|
|
6589
|
+
);
|
|
6414
6590
|
}
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
for (
|
|
6418
|
-
|
|
6419
|
-
var value = internalSlots[key];
|
|
6591
|
+
const internalSlots = getInternalSlots(this);
|
|
6592
|
+
const ro = {};
|
|
6593
|
+
for (const key of RESOLVED_OPTIONS_KEYS) {
|
|
6594
|
+
let value = internalSlots[key];
|
|
6420
6595
|
if (key === "hourCycle") {
|
|
6421
|
-
|
|
6596
|
+
const hour12 = value === "h11" || value === "h12" ? true : value === "h23" || value === "h24" ? false : void 0;
|
|
6422
6597
|
if (hour12 !== void 0) {
|
|
6423
6598
|
ro.hour12 = hour12;
|
|
6424
6599
|
}
|
|
@@ -6435,7 +6610,7 @@
|
|
|
6435
6610
|
return ro;
|
|
6436
6611
|
}
|
|
6437
6612
|
});
|
|
6438
|
-
defineProperty(
|
|
6613
|
+
defineProperty(DateTimeFormat4.prototype, "formatToParts", {
|
|
6439
6614
|
value: function formatToParts2(date) {
|
|
6440
6615
|
if (date === void 0) {
|
|
6441
6616
|
date = Date.now();
|
|
@@ -6444,140 +6619,149 @@
|
|
|
6444
6619
|
}
|
|
6445
6620
|
return FormatDateTimeToParts(this, date, {
|
|
6446
6621
|
getInternalSlots,
|
|
6447
|
-
localeData:
|
|
6448
|
-
tzData:
|
|
6449
|
-
getDefaultTimeZone:
|
|
6622
|
+
localeData: DateTimeFormat4.localeData,
|
|
6623
|
+
tzData: DateTimeFormat4.tzData,
|
|
6624
|
+
getDefaultTimeZone: DateTimeFormat4.getDefaultTimeZone
|
|
6450
6625
|
});
|
|
6451
6626
|
}
|
|
6452
6627
|
});
|
|
6453
|
-
defineProperty(
|
|
6628
|
+
defineProperty(DateTimeFormat4.prototype, "formatRangeToParts", {
|
|
6454
6629
|
value: function formatRangeToParts(startDate, endDate) {
|
|
6455
|
-
|
|
6630
|
+
const dtf = this;
|
|
6456
6631
|
if (typeof dtf !== "object") {
|
|
6457
6632
|
throw new TypeError();
|
|
6458
6633
|
}
|
|
6459
6634
|
if (startDate === void 0 || endDate === void 0) {
|
|
6460
6635
|
throw new TypeError("startDate/endDate cannot be undefined");
|
|
6461
6636
|
}
|
|
6462
|
-
|
|
6463
|
-
|
|
6637
|
+
const x = ToNumber(startDate);
|
|
6638
|
+
const y = ToNumber(endDate);
|
|
6464
6639
|
return FormatDateTimeRangeToParts(dtf, x, y, {
|
|
6465
6640
|
getInternalSlots,
|
|
6466
|
-
localeData:
|
|
6467
|
-
tzData:
|
|
6468
|
-
getDefaultTimeZone:
|
|
6641
|
+
localeData: DateTimeFormat4.localeData,
|
|
6642
|
+
tzData: DateTimeFormat4.tzData,
|
|
6643
|
+
getDefaultTimeZone: DateTimeFormat4.getDefaultTimeZone
|
|
6469
6644
|
});
|
|
6470
6645
|
}
|
|
6471
6646
|
});
|
|
6472
|
-
defineProperty(
|
|
6647
|
+
defineProperty(DateTimeFormat4.prototype, "formatRange", {
|
|
6473
6648
|
value: function formatRange(startDate, endDate) {
|
|
6474
|
-
|
|
6649
|
+
const dtf = this;
|
|
6475
6650
|
if (typeof dtf !== "object") {
|
|
6476
6651
|
throw new TypeError();
|
|
6477
6652
|
}
|
|
6478
6653
|
if (startDate === void 0 || endDate === void 0) {
|
|
6479
6654
|
throw new TypeError("startDate/endDate cannot be undefined");
|
|
6480
6655
|
}
|
|
6481
|
-
|
|
6482
|
-
|
|
6656
|
+
const x = ToNumber(startDate);
|
|
6657
|
+
const y = ToNumber(endDate);
|
|
6483
6658
|
return FormatDateTimeRange(dtf, x, y, {
|
|
6484
6659
|
getInternalSlots,
|
|
6485
|
-
localeData:
|
|
6486
|
-
tzData:
|
|
6487
|
-
getDefaultTimeZone:
|
|
6660
|
+
localeData: DateTimeFormat4.localeData,
|
|
6661
|
+
tzData: DateTimeFormat4.tzData,
|
|
6662
|
+
getDefaultTimeZone: DateTimeFormat4.getDefaultTimeZone
|
|
6488
6663
|
});
|
|
6489
6664
|
}
|
|
6490
6665
|
});
|
|
6491
6666
|
var DEFAULT_TIMEZONE = "UTC";
|
|
6492
|
-
|
|
6667
|
+
DateTimeFormat4.__setDefaultTimeZone = (timeZone) => {
|
|
6493
6668
|
if (timeZone !== void 0) {
|
|
6494
6669
|
timeZone = String(timeZone);
|
|
6495
6670
|
if (!IsValidTimeZoneName(timeZone, {
|
|
6496
|
-
zoneNamesFromData: Object.keys(
|
|
6671
|
+
zoneNamesFromData: Object.keys(DateTimeFormat4.tzData),
|
|
6497
6672
|
uppercaseLinks: UPPERCASED_LINKS
|
|
6498
6673
|
})) {
|
|
6499
6674
|
throw new RangeError("Invalid timeZoneName");
|
|
6500
6675
|
}
|
|
6501
6676
|
timeZone = CanonicalizeTimeZoneName(timeZone, {
|
|
6502
|
-
zoneNames: Object.keys(
|
|
6677
|
+
zoneNames: Object.keys(DateTimeFormat4.tzData),
|
|
6503
6678
|
uppercaseLinks: UPPERCASED_LINKS
|
|
6504
6679
|
});
|
|
6505
6680
|
} else {
|
|
6506
6681
|
timeZone = DEFAULT_TIMEZONE;
|
|
6507
6682
|
}
|
|
6508
|
-
|
|
6683
|
+
DateTimeFormat4.__defaultTimeZone = timeZone;
|
|
6509
6684
|
};
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6685
|
+
DateTimeFormat4.relevantExtensionKeys = ["nu", "ca", "hc"];
|
|
6686
|
+
DateTimeFormat4.__defaultTimeZone = DEFAULT_TIMEZONE;
|
|
6687
|
+
DateTimeFormat4.getDefaultTimeZone = () => DateTimeFormat4.__defaultTimeZone;
|
|
6688
|
+
DateTimeFormat4.__addLocaleData = function __addLocaleData(...data2) {
|
|
6689
|
+
for (const { data: d, locale } of data2) {
|
|
6690
|
+
const _a = d, {
|
|
6691
|
+
dateFormat,
|
|
6692
|
+
timeFormat,
|
|
6693
|
+
dateTimeFormat,
|
|
6694
|
+
formats,
|
|
6695
|
+
intervalFormats
|
|
6696
|
+
} = _a, rawData = __objRest(_a, [
|
|
6697
|
+
"dateFormat",
|
|
6698
|
+
"timeFormat",
|
|
6699
|
+
"dateTimeFormat",
|
|
6700
|
+
"formats",
|
|
6701
|
+
"intervalFormats"
|
|
6702
|
+
]);
|
|
6703
|
+
const processedData = __spreadProps(__spreadValues({}, rawData), {
|
|
6704
|
+
dateFormat: {
|
|
6705
|
+
full: parseDateTimeSkeleton(dateFormat.full),
|
|
6706
|
+
long: parseDateTimeSkeleton(dateFormat.long),
|
|
6707
|
+
medium: parseDateTimeSkeleton(dateFormat.medium),
|
|
6708
|
+
short: parseDateTimeSkeleton(dateFormat.short)
|
|
6709
|
+
},
|
|
6710
|
+
timeFormat: {
|
|
6711
|
+
full: parseDateTimeSkeleton(timeFormat.full),
|
|
6712
|
+
long: parseDateTimeSkeleton(timeFormat.long),
|
|
6713
|
+
medium: parseDateTimeSkeleton(timeFormat.medium),
|
|
6714
|
+
short: parseDateTimeSkeleton(timeFormat.short)
|
|
6715
|
+
},
|
|
6716
|
+
dateTimeFormat: {
|
|
6717
|
+
full: parseDateTimeSkeleton(dateTimeFormat.full).pattern,
|
|
6718
|
+
long: parseDateTimeSkeleton(dateTimeFormat.long).pattern,
|
|
6719
|
+
medium: parseDateTimeSkeleton(dateTimeFormat.medium).pattern,
|
|
6720
|
+
short: parseDateTimeSkeleton(dateTimeFormat.short).pattern
|
|
6721
|
+
},
|
|
6722
|
+
formats: {}
|
|
6723
|
+
});
|
|
6724
|
+
for (const calendar in formats) {
|
|
6725
|
+
processedData.formats[calendar] = Object.keys(formats[calendar]).map(
|
|
6726
|
+
(skeleton) => parseDateTimeSkeleton(
|
|
6727
|
+
skeleton,
|
|
6728
|
+
formats[calendar][skeleton],
|
|
6729
|
+
intervalFormats[skeleton],
|
|
6730
|
+
intervalFormats.intervalFormatFallback
|
|
6731
|
+
)
|
|
6732
|
+
);
|
|
6545
6733
|
}
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
if (!
|
|
6551
|
-
|
|
6734
|
+
const minimizedLocale = new Intl.Locale(locale).minimize().toString();
|
|
6735
|
+
DateTimeFormat4.localeData[locale] = DateTimeFormat4.localeData[minimizedLocale] = processedData;
|
|
6736
|
+
DateTimeFormat4.availableLocales.add(locale);
|
|
6737
|
+
DateTimeFormat4.availableLocales.add(minimizedLocale);
|
|
6738
|
+
if (!DateTimeFormat4.__defaultLocale) {
|
|
6739
|
+
DateTimeFormat4.__defaultLocale = minimizedLocale;
|
|
6552
6740
|
}
|
|
6553
|
-
};
|
|
6554
|
-
for (var _a = 0, data_1 = data2; _a < data_1.length; _a++) {
|
|
6555
|
-
var _b = data_1[_a], d = _b.data, locale = _b.locale;
|
|
6556
|
-
_loop_1(d, locale);
|
|
6557
6741
|
}
|
|
6558
6742
|
};
|
|
6559
|
-
Object.defineProperty(
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
return
|
|
6743
|
+
Object.defineProperty(DateTimeFormat4.prototype, "format", formatDescriptor);
|
|
6744
|
+
DateTimeFormat4.__defaultLocale = "";
|
|
6745
|
+
DateTimeFormat4.localeData = {};
|
|
6746
|
+
DateTimeFormat4.availableLocales = /* @__PURE__ */ new Set();
|
|
6747
|
+
DateTimeFormat4.getDefaultLocale = () => {
|
|
6748
|
+
return DateTimeFormat4.__defaultLocale;
|
|
6565
6749
|
};
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6750
|
+
DateTimeFormat4.polyfilled = true;
|
|
6751
|
+
DateTimeFormat4.tzData = {};
|
|
6752
|
+
DateTimeFormat4.__addTZData = function(d) {
|
|
6753
|
+
DateTimeFormat4.tzData = unpack(d);
|
|
6570
6754
|
};
|
|
6571
6755
|
try {
|
|
6572
6756
|
if (typeof Symbol !== "undefined") {
|
|
6573
|
-
Object.defineProperty(
|
|
6757
|
+
Object.defineProperty(DateTimeFormat4.prototype, Symbol.toStringTag, {
|
|
6574
6758
|
value: "Intl.DateTimeFormat",
|
|
6575
6759
|
writable: false,
|
|
6576
6760
|
enumerable: false,
|
|
6577
6761
|
configurable: true
|
|
6578
6762
|
});
|
|
6579
6763
|
}
|
|
6580
|
-
Object.defineProperty(
|
|
6764
|
+
Object.defineProperty(DateTimeFormat4.prototype.constructor, "length", {
|
|
6581
6765
|
value: 1,
|
|
6582
6766
|
writable: false,
|
|
6583
6767
|
enumerable: false,
|
|
@@ -6586,10 +6770,10 @@
|
|
|
6586
6770
|
} catch (e) {
|
|
6587
6771
|
}
|
|
6588
6772
|
|
|
6589
|
-
//
|
|
6773
|
+
// packages/intl-datetimeformat/supported-locales.generated.ts
|
|
6590
6774
|
var supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
|
|
6591
6775
|
|
|
6592
|
-
//
|
|
6776
|
+
// packages/intl-datetimeformat/should-polyfill.ts
|
|
6593
6777
|
function supportsDateStyle() {
|
|
6594
6778
|
try {
|
|
6595
6779
|
return !!new Intl.DateTimeFormat(void 0, {
|
|
@@ -6623,35 +6807,38 @@
|
|
|
6623
6807
|
if (!locale) {
|
|
6624
6808
|
return true;
|
|
6625
6809
|
}
|
|
6626
|
-
|
|
6810
|
+
const locales = Array.isArray(locale) ? locale : [locale];
|
|
6627
6811
|
return Intl.DateTimeFormat.supportedLocalesOf(locales).length === locales.length;
|
|
6628
6812
|
}
|
|
6629
|
-
function shouldPolyfill(locale) {
|
|
6630
|
-
if (locale === void 0) {
|
|
6631
|
-
locale = "en";
|
|
6632
|
-
}
|
|
6813
|
+
function shouldPolyfill(locale = "en") {
|
|
6633
6814
|
if (!("DateTimeFormat" in Intl) || !("formatToParts" in Intl.DateTimeFormat.prototype) || !("formatRange" in Intl.DateTimeFormat.prototype) || hasChromeLt71Bug() || hasUnthrownDateTimeStyleBug() || !supportsDateStyle() || !supportedLocalesOf2(locale)) {
|
|
6634
6815
|
return locale ? match([locale], supportedLocales, "en") : void 0;
|
|
6635
6816
|
}
|
|
6636
6817
|
}
|
|
6637
6818
|
|
|
6638
|
-
//
|
|
6819
|
+
// packages/intl-datetimeformat/src/to_locale_string.ts
|
|
6639
6820
|
function toLocaleString(x, locales, options) {
|
|
6640
|
-
|
|
6821
|
+
const dtf = new DateTimeFormat4(locales, options);
|
|
6641
6822
|
return dtf.format(x);
|
|
6642
6823
|
}
|
|
6643
6824
|
function toLocaleDateString(x, locales, options) {
|
|
6644
|
-
|
|
6825
|
+
const dtf = new DateTimeFormat4(
|
|
6826
|
+
locales,
|
|
6827
|
+
ToDateTimeOptions(options, "date", "date")
|
|
6828
|
+
);
|
|
6645
6829
|
return dtf.format(x);
|
|
6646
6830
|
}
|
|
6647
6831
|
function toLocaleTimeString(x, locales, options) {
|
|
6648
|
-
|
|
6832
|
+
const dtf = new DateTimeFormat4(
|
|
6833
|
+
locales,
|
|
6834
|
+
ToDateTimeOptions(options, "time", "time")
|
|
6835
|
+
);
|
|
6649
6836
|
return dtf.format(x);
|
|
6650
6837
|
}
|
|
6651
6838
|
|
|
6652
|
-
//
|
|
6839
|
+
// packages/intl-datetimeformat/polyfill.ts
|
|
6653
6840
|
if (shouldPolyfill()) {
|
|
6654
|
-
defineProperty(Intl, "DateTimeFormat", { value:
|
|
6841
|
+
defineProperty(Intl, "DateTimeFormat", { value: DateTimeFormat4 });
|
|
6655
6842
|
defineProperty(Date.prototype, "toLocaleString", {
|
|
6656
6843
|
value: function toLocaleString2(locales, options) {
|
|
6657
6844
|
try {
|