@formatjs/intl-relativetimeformat 9.3.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/LICENSE.md +9 -0
- package/README.md +3 -0
- package/abstract/FormatRelativeTime.d.ts +5 -0
- package/abstract/FormatRelativeTime.d.ts.map +1 -0
- package/abstract/FormatRelativeTime.js +14 -0
- package/abstract/FormatRelativeTimeToParts.d.ts +5 -0
- package/abstract/FormatRelativeTimeToParts.d.ts.map +1 -0
- package/abstract/FormatRelativeTimeToParts.js +22 -0
- package/abstract/InitializeRelativeTimeFormat.d.ts +9 -0
- package/abstract/InitializeRelativeTimeFormat.d.ts.map +1 -0
- package/abstract/InitializeRelativeTimeFormat.js +38 -0
- package/abstract/MakePartsList.d.ts +2 -0
- package/abstract/MakePartsList.d.ts.map +1 -0
- package/abstract/MakePartsList.js +30 -0
- package/abstract/PartitionRelativeTimePattern.d.ts +5 -0
- package/abstract/PartitionRelativeTimePattern.d.ts.map +1 -0
- package/abstract/PartitionRelativeTimePattern.js +57 -0
- package/abstract/SingularRelativeTimeUnit.d.ts +7 -0
- package/abstract/SingularRelativeTimeUnit.d.ts.map +1 -0
- package/abstract/SingularRelativeTimeUnit.js +39 -0
- package/get_internal_slots.d.ts +3 -0
- package/get_internal_slots.d.ts.map +1 -0
- package/get_internal_slots.js +14 -0
- package/index.d.ts +16 -0
- package/index.d.ts.map +1 -0
- package/index.js +123 -0
- package/lib/abstract/FormatRelativeTime.d.ts +5 -0
- package/lib/abstract/FormatRelativeTime.d.ts.map +1 -0
- package/lib/abstract/FormatRelativeTime.js +10 -0
- package/lib/abstract/FormatRelativeTimeToParts.d.ts +5 -0
- package/lib/abstract/FormatRelativeTimeToParts.d.ts.map +1 -0
- package/lib/abstract/FormatRelativeTimeToParts.js +18 -0
- package/lib/abstract/InitializeRelativeTimeFormat.d.ts +9 -0
- package/lib/abstract/InitializeRelativeTimeFormat.d.ts.map +1 -0
- package/lib/abstract/InitializeRelativeTimeFormat.js +34 -0
- package/lib/abstract/MakePartsList.d.ts +2 -0
- package/lib/abstract/MakePartsList.d.ts.map +1 -0
- package/lib/abstract/MakePartsList.js +26 -0
- package/lib/abstract/PartitionRelativeTimePattern.d.ts +5 -0
- package/lib/abstract/PartitionRelativeTimePattern.d.ts.map +1 -0
- package/lib/abstract/PartitionRelativeTimePattern.js +53 -0
- package/lib/abstract/SingularRelativeTimeUnit.d.ts +7 -0
- package/lib/abstract/SingularRelativeTimeUnit.d.ts.map +1 -0
- package/lib/abstract/SingularRelativeTimeUnit.js +35 -0
- package/lib/get_internal_slots.d.ts +3 -0
- package/lib/get_internal_slots.d.ts.map +1 -0
- package/lib/get_internal_slots.js +11 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +120 -0
- package/lib/polyfill-force.d.ts +2 -0
- package/lib/polyfill-force.d.ts.map +1 -0
- package/lib/polyfill-force.js +7 -0
- package/lib/polyfill.d.ts +2 -0
- package/lib/polyfill.d.ts.map +1 -0
- package/lib/polyfill.js +10 -0
- package/lib/should-polyfill.d.ts +2 -0
- package/lib/should-polyfill.d.ts.map +1 -0
- package/lib/should-polyfill.js +24 -0
- package/locale-data/af-NA.d.ts +1 -0
- package/locale-data/af-NA.js +6 -0
- package/locale-data/af.d.ts +1 -0
- package/locale-data/af.js +6 -0
- package/locale-data/agq.d.ts +1 -0
- package/locale-data/agq.js +6 -0
- package/locale-data/ak.d.ts +1 -0
- package/locale-data/ak.js +6 -0
- package/locale-data/am.d.ts +1 -0
- package/locale-data/am.js +6 -0
- package/locale-data/ar-AE.d.ts +1 -0
- package/locale-data/ar-AE.js +6 -0
- package/locale-data/ar-BH.d.ts +1 -0
- package/locale-data/ar-BH.js +6 -0
- package/locale-data/ar-DJ.d.ts +1 -0
- package/locale-data/ar-DJ.js +6 -0
- package/locale-data/ar-DZ.d.ts +1 -0
- package/locale-data/ar-DZ.js +6 -0
- package/locale-data/ar-EG.d.ts +1 -0
- package/locale-data/ar-EG.js +6 -0
- package/locale-data/ar-EH.d.ts +1 -0
- package/locale-data/ar-EH.js +6 -0
- package/locale-data/ar-ER.d.ts +1 -0
- package/locale-data/ar-ER.js +6 -0
- package/locale-data/ar-IL.d.ts +1 -0
- package/locale-data/ar-IL.js +6 -0
- package/locale-data/ar-IQ.d.ts +1 -0
- package/locale-data/ar-IQ.js +6 -0
- package/locale-data/ar-JO.d.ts +1 -0
- package/locale-data/ar-JO.js +6 -0
- package/locale-data/ar-KM.d.ts +1 -0
- package/locale-data/ar-KM.js +6 -0
- package/locale-data/ar-KW.d.ts +1 -0
- package/locale-data/ar-KW.js +6 -0
- package/locale-data/ar-LB.d.ts +1 -0
- package/locale-data/ar-LB.js +6 -0
- package/locale-data/ar-LY.d.ts +1 -0
- package/locale-data/ar-LY.js +6 -0
- package/locale-data/ar-MA.d.ts +1 -0
- package/locale-data/ar-MA.js +6 -0
- package/locale-data/ar-MR.d.ts +1 -0
- package/locale-data/ar-MR.js +6 -0
- package/locale-data/ar-OM.d.ts +1 -0
- package/locale-data/ar-OM.js +6 -0
- package/locale-data/ar-PS.d.ts +1 -0
- package/locale-data/ar-PS.js +6 -0
- package/locale-data/ar-QA.d.ts +1 -0
- package/locale-data/ar-QA.js +6 -0
- package/locale-data/ar-SA.d.ts +1 -0
- package/locale-data/ar-SA.js +6 -0
- package/locale-data/ar-SD.d.ts +1 -0
- package/locale-data/ar-SD.js +6 -0
- package/locale-data/ar-SO.d.ts +1 -0
- package/locale-data/ar-SO.js +6 -0
- package/locale-data/ar-SS.d.ts +1 -0
- package/locale-data/ar-SS.js +6 -0
- package/locale-data/ar-SY.d.ts +1 -0
- package/locale-data/ar-SY.js +6 -0
- package/locale-data/ar-TD.d.ts +1 -0
- package/locale-data/ar-TD.js +6 -0
- package/locale-data/ar-TN.d.ts +1 -0
- package/locale-data/ar-TN.js +6 -0
- package/locale-data/ar-YE.d.ts +1 -0
- package/locale-data/ar-YE.js +6 -0
- package/locale-data/ar.d.ts +1 -0
- package/locale-data/ar.js +6 -0
- package/locale-data/as.d.ts +1 -0
- package/locale-data/as.js +6 -0
- package/locale-data/asa.d.ts +1 -0
- package/locale-data/asa.js +6 -0
- package/locale-data/ast.d.ts +1 -0
- package/locale-data/ast.js +6 -0
- package/locale-data/az-Cyrl.d.ts +1 -0
- package/locale-data/az-Cyrl.js +6 -0
- package/locale-data/az-Latn.d.ts +1 -0
- package/locale-data/az-Latn.js +6 -0
- package/locale-data/az.d.ts +1 -0
- package/locale-data/az.js +6 -0
- package/locale-data/bas.d.ts +1 -0
- package/locale-data/bas.js +6 -0
- package/locale-data/be.d.ts +1 -0
- package/locale-data/be.js +6 -0
- package/locale-data/bem.d.ts +1 -0
- package/locale-data/bem.js +6 -0
- package/locale-data/bez.d.ts +1 -0
- package/locale-data/bez.js +6 -0
- package/locale-data/bg.d.ts +1 -0
- package/locale-data/bg.js +6 -0
- package/locale-data/bm.d.ts +1 -0
- package/locale-data/bm.js +6 -0
- package/locale-data/bn-IN.d.ts +1 -0
- package/locale-data/bn-IN.js +6 -0
- package/locale-data/bn.d.ts +1 -0
- package/locale-data/bn.js +6 -0
- package/locale-data/bo-IN.d.ts +1 -0
- package/locale-data/bo-IN.js +6 -0
- package/locale-data/bo.d.ts +1 -0
- package/locale-data/bo.js +6 -0
- package/locale-data/br.d.ts +1 -0
- package/locale-data/br.js +6 -0
- package/locale-data/brx.d.ts +1 -0
- package/locale-data/brx.js +6 -0
- package/locale-data/bs-Cyrl.d.ts +1 -0
- package/locale-data/bs-Cyrl.js +6 -0
- package/locale-data/bs-Latn.d.ts +1 -0
- package/locale-data/bs-Latn.js +6 -0
- package/locale-data/bs.d.ts +1 -0
- package/locale-data/bs.js +6 -0
- package/locale-data/ca-AD.d.ts +1 -0
- package/locale-data/ca-AD.js +6 -0
- package/locale-data/ca-ES-VALENCIA.d.ts +1 -0
- package/locale-data/ca-ES-VALENCIA.js +6 -0
- package/locale-data/ca-FR.d.ts +1 -0
- package/locale-data/ca-FR.js +6 -0
- package/locale-data/ca-IT.d.ts +1 -0
- package/locale-data/ca-IT.js +6 -0
- package/locale-data/ca.d.ts +1 -0
- package/locale-data/ca.js +6 -0
- package/locale-data/ccp-IN.d.ts +1 -0
- package/locale-data/ccp-IN.js +6 -0
- package/locale-data/ccp.d.ts +1 -0
- package/locale-data/ccp.js +6 -0
- package/locale-data/ce.d.ts +1 -0
- package/locale-data/ce.js +6 -0
- package/locale-data/ceb.d.ts +1 -0
- package/locale-data/ceb.js +6 -0
- package/locale-data/cgg.d.ts +1 -0
- package/locale-data/cgg.js +6 -0
- package/locale-data/chr.d.ts +1 -0
- package/locale-data/chr.js +6 -0
- package/locale-data/ckb-IR.d.ts +1 -0
- package/locale-data/ckb-IR.js +6 -0
- package/locale-data/ckb.d.ts +1 -0
- package/locale-data/ckb.js +6 -0
- package/locale-data/cs.d.ts +1 -0
- package/locale-data/cs.js +6 -0
- package/locale-data/cy.d.ts +1 -0
- package/locale-data/cy.js +6 -0
- package/locale-data/da-GL.d.ts +1 -0
- package/locale-data/da-GL.js +6 -0
- package/locale-data/da.d.ts +1 -0
- package/locale-data/da.js +6 -0
- package/locale-data/dav.d.ts +1 -0
- package/locale-data/dav.js +6 -0
- package/locale-data/de-AT.d.ts +1 -0
- package/locale-data/de-AT.js +6 -0
- package/locale-data/de-BE.d.ts +1 -0
- package/locale-data/de-BE.js +6 -0
- package/locale-data/de-CH.d.ts +1 -0
- package/locale-data/de-CH.js +6 -0
- package/locale-data/de-IT.d.ts +1 -0
- package/locale-data/de-IT.js +6 -0
- package/locale-data/de-LI.d.ts +1 -0
- package/locale-data/de-LI.js +6 -0
- package/locale-data/de-LU.d.ts +1 -0
- package/locale-data/de-LU.js +6 -0
- package/locale-data/de.d.ts +1 -0
- package/locale-data/de.js +6 -0
- package/locale-data/dje.d.ts +1 -0
- package/locale-data/dje.js +6 -0
- package/locale-data/doi.d.ts +1 -0
- package/locale-data/doi.js +6 -0
- package/locale-data/dsb.d.ts +1 -0
- package/locale-data/dsb.js +6 -0
- package/locale-data/dua.d.ts +1 -0
- package/locale-data/dua.js +6 -0
- package/locale-data/dyo.d.ts +1 -0
- package/locale-data/dyo.js +6 -0
- package/locale-data/dz.d.ts +1 -0
- package/locale-data/dz.js +6 -0
- package/locale-data/ebu.d.ts +1 -0
- package/locale-data/ebu.js +6 -0
- package/locale-data/ee-TG.d.ts +1 -0
- package/locale-data/ee-TG.js +6 -0
- package/locale-data/ee.d.ts +1 -0
- package/locale-data/ee.js +6 -0
- package/locale-data/el-CY.d.ts +1 -0
- package/locale-data/el-CY.js +6 -0
- package/locale-data/el.d.ts +1 -0
- package/locale-data/el.js +6 -0
- package/locale-data/en-001.d.ts +1 -0
- package/locale-data/en-001.js +6 -0
- package/locale-data/en-150.d.ts +1 -0
- package/locale-data/en-150.js +6 -0
- package/locale-data/en-AE.d.ts +1 -0
- package/locale-data/en-AE.js +6 -0
- package/locale-data/en-AG.d.ts +1 -0
- package/locale-data/en-AG.js +6 -0
- package/locale-data/en-AI.d.ts +1 -0
- package/locale-data/en-AI.js +6 -0
- package/locale-data/en-AS.d.ts +1 -0
- package/locale-data/en-AS.js +6 -0
- package/locale-data/en-AT.d.ts +1 -0
- package/locale-data/en-AT.js +6 -0
- package/locale-data/en-AU.d.ts +1 -0
- package/locale-data/en-AU.js +6 -0
- package/locale-data/en-BB.d.ts +1 -0
- package/locale-data/en-BB.js +6 -0
- package/locale-data/en-BE.d.ts +1 -0
- package/locale-data/en-BE.js +6 -0
- package/locale-data/en-BI.d.ts +1 -0
- package/locale-data/en-BI.js +6 -0
- package/locale-data/en-BM.d.ts +1 -0
- package/locale-data/en-BM.js +6 -0
- package/locale-data/en-BS.d.ts +1 -0
- package/locale-data/en-BS.js +6 -0
- package/locale-data/en-BW.d.ts +1 -0
- package/locale-data/en-BW.js +6 -0
- package/locale-data/en-BZ.d.ts +1 -0
- package/locale-data/en-BZ.js +6 -0
- package/locale-data/en-CA.d.ts +1 -0
- package/locale-data/en-CA.js +6 -0
- package/locale-data/en-CC.d.ts +1 -0
- package/locale-data/en-CC.js +6 -0
- package/locale-data/en-CH.d.ts +1 -0
- package/locale-data/en-CH.js +6 -0
- package/locale-data/en-CK.d.ts +1 -0
- package/locale-data/en-CK.js +6 -0
- package/locale-data/en-CM.d.ts +1 -0
- package/locale-data/en-CM.js +6 -0
- package/locale-data/en-CX.d.ts +1 -0
- package/locale-data/en-CX.js +6 -0
- package/locale-data/en-CY.d.ts +1 -0
- package/locale-data/en-CY.js +6 -0
- package/locale-data/en-DE.d.ts +1 -0
- package/locale-data/en-DE.js +6 -0
- package/locale-data/en-DG.d.ts +1 -0
- package/locale-data/en-DG.js +6 -0
- package/locale-data/en-DK.d.ts +1 -0
- package/locale-data/en-DK.js +6 -0
- package/locale-data/en-DM.d.ts +1 -0
- package/locale-data/en-DM.js +6 -0
- package/locale-data/en-ER.d.ts +1 -0
- package/locale-data/en-ER.js +6 -0
- package/locale-data/en-FI.d.ts +1 -0
- package/locale-data/en-FI.js +6 -0
- package/locale-data/en-FJ.d.ts +1 -0
- package/locale-data/en-FJ.js +6 -0
- package/locale-data/en-FK.d.ts +1 -0
- package/locale-data/en-FK.js +6 -0
- package/locale-data/en-FM.d.ts +1 -0
- package/locale-data/en-FM.js +6 -0
- package/locale-data/en-GB.d.ts +1 -0
- package/locale-data/en-GB.js +6 -0
- package/locale-data/en-GD.d.ts +1 -0
- package/locale-data/en-GD.js +6 -0
- package/locale-data/en-GG.d.ts +1 -0
- package/locale-data/en-GG.js +6 -0
- package/locale-data/en-GH.d.ts +1 -0
- package/locale-data/en-GH.js +6 -0
- package/locale-data/en-GI.d.ts +1 -0
- package/locale-data/en-GI.js +6 -0
- package/locale-data/en-GM.d.ts +1 -0
- package/locale-data/en-GM.js +6 -0
- package/locale-data/en-GU.d.ts +1 -0
- package/locale-data/en-GU.js +6 -0
- package/locale-data/en-GY.d.ts +1 -0
- package/locale-data/en-GY.js +6 -0
- package/locale-data/en-HK.d.ts +1 -0
- package/locale-data/en-HK.js +6 -0
- package/locale-data/en-IE.d.ts +1 -0
- package/locale-data/en-IE.js +6 -0
- package/locale-data/en-IL.d.ts +1 -0
- package/locale-data/en-IL.js +6 -0
- package/locale-data/en-IM.d.ts +1 -0
- package/locale-data/en-IM.js +6 -0
- package/locale-data/en-IN.d.ts +1 -0
- package/locale-data/en-IN.js +6 -0
- package/locale-data/en-IO.d.ts +1 -0
- package/locale-data/en-IO.js +6 -0
- package/locale-data/en-JE.d.ts +1 -0
- package/locale-data/en-JE.js +6 -0
- package/locale-data/en-JM.d.ts +1 -0
- package/locale-data/en-JM.js +6 -0
- package/locale-data/en-KE.d.ts +1 -0
- package/locale-data/en-KE.js +6 -0
- package/locale-data/en-KI.d.ts +1 -0
- package/locale-data/en-KI.js +6 -0
- package/locale-data/en-KN.d.ts +1 -0
- package/locale-data/en-KN.js +6 -0
- package/locale-data/en-KY.d.ts +1 -0
- package/locale-data/en-KY.js +6 -0
- package/locale-data/en-LC.d.ts +1 -0
- package/locale-data/en-LC.js +6 -0
- package/locale-data/en-LR.d.ts +1 -0
- package/locale-data/en-LR.js +6 -0
- package/locale-data/en-LS.d.ts +1 -0
- package/locale-data/en-LS.js +6 -0
- package/locale-data/en-MG.d.ts +1 -0
- package/locale-data/en-MG.js +6 -0
- package/locale-data/en-MH.d.ts +1 -0
- package/locale-data/en-MH.js +6 -0
- package/locale-data/en-MO.d.ts +1 -0
- package/locale-data/en-MO.js +6 -0
- package/locale-data/en-MP.d.ts +1 -0
- package/locale-data/en-MP.js +6 -0
- package/locale-data/en-MS.d.ts +1 -0
- package/locale-data/en-MS.js +6 -0
- package/locale-data/en-MT.d.ts +1 -0
- package/locale-data/en-MT.js +6 -0
- package/locale-data/en-MU.d.ts +1 -0
- package/locale-data/en-MU.js +6 -0
- package/locale-data/en-MW.d.ts +1 -0
- package/locale-data/en-MW.js +6 -0
- package/locale-data/en-MY.d.ts +1 -0
- package/locale-data/en-MY.js +6 -0
- package/locale-data/en-NA.d.ts +1 -0
- package/locale-data/en-NA.js +6 -0
- package/locale-data/en-NF.d.ts +1 -0
- package/locale-data/en-NF.js +6 -0
- package/locale-data/en-NG.d.ts +1 -0
- package/locale-data/en-NG.js +6 -0
- package/locale-data/en-NL.d.ts +1 -0
- package/locale-data/en-NL.js +6 -0
- package/locale-data/en-NR.d.ts +1 -0
- package/locale-data/en-NR.js +6 -0
- package/locale-data/en-NU.d.ts +1 -0
- package/locale-data/en-NU.js +6 -0
- package/locale-data/en-NZ.d.ts +1 -0
- package/locale-data/en-NZ.js +6 -0
- package/locale-data/en-PG.d.ts +1 -0
- package/locale-data/en-PG.js +6 -0
- package/locale-data/en-PH.d.ts +1 -0
- package/locale-data/en-PH.js +6 -0
- package/locale-data/en-PK.d.ts +1 -0
- package/locale-data/en-PK.js +6 -0
- package/locale-data/en-PN.d.ts +1 -0
- package/locale-data/en-PN.js +6 -0
- package/locale-data/en-PR.d.ts +1 -0
- package/locale-data/en-PR.js +6 -0
- package/locale-data/en-PW.d.ts +1 -0
- package/locale-data/en-PW.js +6 -0
- package/locale-data/en-RW.d.ts +1 -0
- package/locale-data/en-RW.js +6 -0
- package/locale-data/en-SB.d.ts +1 -0
- package/locale-data/en-SB.js +6 -0
- package/locale-data/en-SC.d.ts +1 -0
- package/locale-data/en-SC.js +6 -0
- package/locale-data/en-SD.d.ts +1 -0
- package/locale-data/en-SD.js +6 -0
- package/locale-data/en-SE.d.ts +1 -0
- package/locale-data/en-SE.js +6 -0
- package/locale-data/en-SG.d.ts +1 -0
- package/locale-data/en-SG.js +6 -0
- package/locale-data/en-SH.d.ts +1 -0
- package/locale-data/en-SH.js +6 -0
- package/locale-data/en-SI.d.ts +1 -0
- package/locale-data/en-SI.js +6 -0
- package/locale-data/en-SL.d.ts +1 -0
- package/locale-data/en-SL.js +6 -0
- package/locale-data/en-SS.d.ts +1 -0
- package/locale-data/en-SS.js +6 -0
- package/locale-data/en-SX.d.ts +1 -0
- package/locale-data/en-SX.js +6 -0
- package/locale-data/en-SZ.d.ts +1 -0
- package/locale-data/en-SZ.js +6 -0
- package/locale-data/en-TC.d.ts +1 -0
- package/locale-data/en-TC.js +6 -0
- package/locale-data/en-TK.d.ts +1 -0
- package/locale-data/en-TK.js +6 -0
- package/locale-data/en-TO.d.ts +1 -0
- package/locale-data/en-TO.js +6 -0
- package/locale-data/en-TT.d.ts +1 -0
- package/locale-data/en-TT.js +6 -0
- package/locale-data/en-TV.d.ts +1 -0
- package/locale-data/en-TV.js +6 -0
- package/locale-data/en-TZ.d.ts +1 -0
- package/locale-data/en-TZ.js +6 -0
- package/locale-data/en-UG.d.ts +1 -0
- package/locale-data/en-UG.js +6 -0
- package/locale-data/en-UM.d.ts +1 -0
- package/locale-data/en-UM.js +6 -0
- package/locale-data/en-US-POSIX.d.ts +1 -0
- package/locale-data/en-US-POSIX.js +6 -0
- package/locale-data/en-VC.d.ts +1 -0
- package/locale-data/en-VC.js +6 -0
- package/locale-data/en-VG.d.ts +1 -0
- package/locale-data/en-VG.js +6 -0
- package/locale-data/en-VI.d.ts +1 -0
- package/locale-data/en-VI.js +6 -0
- package/locale-data/en-VU.d.ts +1 -0
- package/locale-data/en-VU.js +6 -0
- package/locale-data/en-WS.d.ts +1 -0
- package/locale-data/en-WS.js +6 -0
- package/locale-data/en-ZA.d.ts +1 -0
- package/locale-data/en-ZA.js +6 -0
- package/locale-data/en-ZM.d.ts +1 -0
- package/locale-data/en-ZM.js +6 -0
- package/locale-data/en-ZW.d.ts +1 -0
- package/locale-data/en-ZW.js +6 -0
- package/locale-data/en.d.ts +1 -0
- package/locale-data/en.js +6 -0
- package/locale-data/eo.d.ts +1 -0
- package/locale-data/eo.js +6 -0
- package/locale-data/es-419.d.ts +1 -0
- package/locale-data/es-419.js +6 -0
- package/locale-data/es-AR.d.ts +1 -0
- package/locale-data/es-AR.js +6 -0
- package/locale-data/es-BO.d.ts +1 -0
- package/locale-data/es-BO.js +6 -0
- package/locale-data/es-BR.d.ts +1 -0
- package/locale-data/es-BR.js +6 -0
- package/locale-data/es-BZ.d.ts +1 -0
- package/locale-data/es-BZ.js +6 -0
- package/locale-data/es-CL.d.ts +1 -0
- package/locale-data/es-CL.js +6 -0
- package/locale-data/es-CO.d.ts +1 -0
- package/locale-data/es-CO.js +6 -0
- package/locale-data/es-CR.d.ts +1 -0
- package/locale-data/es-CR.js +6 -0
- package/locale-data/es-CU.d.ts +1 -0
- package/locale-data/es-CU.js +6 -0
- package/locale-data/es-DO.d.ts +1 -0
- package/locale-data/es-DO.js +6 -0
- package/locale-data/es-EA.d.ts +1 -0
- package/locale-data/es-EA.js +6 -0
- package/locale-data/es-EC.d.ts +1 -0
- package/locale-data/es-EC.js +6 -0
- package/locale-data/es-GQ.d.ts +1 -0
- package/locale-data/es-GQ.js +6 -0
- package/locale-data/es-GT.d.ts +1 -0
- package/locale-data/es-GT.js +6 -0
- package/locale-data/es-HN.d.ts +1 -0
- package/locale-data/es-HN.js +6 -0
- package/locale-data/es-IC.d.ts +1 -0
- package/locale-data/es-IC.js +6 -0
- package/locale-data/es-MX.d.ts +1 -0
- package/locale-data/es-MX.js +6 -0
- package/locale-data/es-NI.d.ts +1 -0
- package/locale-data/es-NI.js +6 -0
- package/locale-data/es-PA.d.ts +1 -0
- package/locale-data/es-PA.js +6 -0
- package/locale-data/es-PE.d.ts +1 -0
- package/locale-data/es-PE.js +6 -0
- package/locale-data/es-PH.d.ts +1 -0
- package/locale-data/es-PH.js +6 -0
- package/locale-data/es-PR.d.ts +1 -0
- package/locale-data/es-PR.js +6 -0
- package/locale-data/es-PY.d.ts +1 -0
- package/locale-data/es-PY.js +6 -0
- package/locale-data/es-SV.d.ts +1 -0
- package/locale-data/es-SV.js +6 -0
- package/locale-data/es-US.d.ts +1 -0
- package/locale-data/es-US.js +6 -0
- package/locale-data/es-UY.d.ts +1 -0
- package/locale-data/es-UY.js +6 -0
- package/locale-data/es-VE.d.ts +1 -0
- package/locale-data/es-VE.js +6 -0
- package/locale-data/es.d.ts +1 -0
- package/locale-data/es.js +6 -0
- package/locale-data/et.d.ts +1 -0
- package/locale-data/et.js +6 -0
- package/locale-data/eu.d.ts +1 -0
- package/locale-data/eu.js +6 -0
- package/locale-data/ewo.d.ts +1 -0
- package/locale-data/ewo.js +6 -0
- package/locale-data/fa-AF.d.ts +1 -0
- package/locale-data/fa-AF.js +6 -0
- package/locale-data/fa.d.ts +1 -0
- package/locale-data/fa.js +6 -0
- package/locale-data/ff-Adlm-BF.d.ts +1 -0
- package/locale-data/ff-Adlm-BF.js +6 -0
- package/locale-data/ff-Adlm-CM.d.ts +1 -0
- package/locale-data/ff-Adlm-CM.js +6 -0
- package/locale-data/ff-Adlm-GH.d.ts +1 -0
- package/locale-data/ff-Adlm-GH.js +6 -0
- package/locale-data/ff-Adlm-GM.d.ts +1 -0
- package/locale-data/ff-Adlm-GM.js +6 -0
- package/locale-data/ff-Adlm-GW.d.ts +1 -0
- package/locale-data/ff-Adlm-GW.js +6 -0
- package/locale-data/ff-Adlm-LR.d.ts +1 -0
- package/locale-data/ff-Adlm-LR.js +6 -0
- package/locale-data/ff-Adlm-MR.d.ts +1 -0
- package/locale-data/ff-Adlm-MR.js +6 -0
- package/locale-data/ff-Adlm-NE.d.ts +1 -0
- package/locale-data/ff-Adlm-NE.js +6 -0
- package/locale-data/ff-Adlm-NG.d.ts +1 -0
- package/locale-data/ff-Adlm-NG.js +6 -0
- package/locale-data/ff-Adlm-SL.d.ts +1 -0
- package/locale-data/ff-Adlm-SL.js +6 -0
- package/locale-data/ff-Adlm-SN.d.ts +1 -0
- package/locale-data/ff-Adlm-SN.js +6 -0
- package/locale-data/ff-Adlm.d.ts +1 -0
- package/locale-data/ff-Adlm.js +6 -0
- package/locale-data/ff-Latn-BF.d.ts +1 -0
- package/locale-data/ff-Latn-BF.js +6 -0
- package/locale-data/ff-Latn-CM.d.ts +1 -0
- package/locale-data/ff-Latn-CM.js +6 -0
- package/locale-data/ff-Latn-GH.d.ts +1 -0
- package/locale-data/ff-Latn-GH.js +6 -0
- package/locale-data/ff-Latn-GM.d.ts +1 -0
- package/locale-data/ff-Latn-GM.js +6 -0
- package/locale-data/ff-Latn-GN.d.ts +1 -0
- package/locale-data/ff-Latn-GN.js +6 -0
- package/locale-data/ff-Latn-GW.d.ts +1 -0
- package/locale-data/ff-Latn-GW.js +6 -0
- package/locale-data/ff-Latn-LR.d.ts +1 -0
- package/locale-data/ff-Latn-LR.js +6 -0
- package/locale-data/ff-Latn-MR.d.ts +1 -0
- package/locale-data/ff-Latn-MR.js +6 -0
- package/locale-data/ff-Latn-NE.d.ts +1 -0
- package/locale-data/ff-Latn-NE.js +6 -0
- package/locale-data/ff-Latn-NG.d.ts +1 -0
- package/locale-data/ff-Latn-NG.js +6 -0
- package/locale-data/ff-Latn-SL.d.ts +1 -0
- package/locale-data/ff-Latn-SL.js +6 -0
- package/locale-data/ff-Latn.d.ts +1 -0
- package/locale-data/ff-Latn.js +6 -0
- package/locale-data/ff.d.ts +1 -0
- package/locale-data/ff.js +6 -0
- package/locale-data/fi.d.ts +1 -0
- package/locale-data/fi.js +6 -0
- package/locale-data/fil.d.ts +1 -0
- package/locale-data/fil.js +6 -0
- package/locale-data/fo-DK.d.ts +1 -0
- package/locale-data/fo-DK.js +6 -0
- package/locale-data/fo.d.ts +1 -0
- package/locale-data/fo.js +6 -0
- package/locale-data/fr-BE.d.ts +1 -0
- package/locale-data/fr-BE.js +6 -0
- package/locale-data/fr-BF.d.ts +1 -0
- package/locale-data/fr-BF.js +6 -0
- package/locale-data/fr-BI.d.ts +1 -0
- package/locale-data/fr-BI.js +6 -0
- package/locale-data/fr-BJ.d.ts +1 -0
- package/locale-data/fr-BJ.js +6 -0
- package/locale-data/fr-BL.d.ts +1 -0
- package/locale-data/fr-BL.js +6 -0
- package/locale-data/fr-CA.d.ts +1 -0
- package/locale-data/fr-CA.js +6 -0
- package/locale-data/fr-CD.d.ts +1 -0
- package/locale-data/fr-CD.js +6 -0
- package/locale-data/fr-CF.d.ts +1 -0
- package/locale-data/fr-CF.js +6 -0
- package/locale-data/fr-CG.d.ts +1 -0
- package/locale-data/fr-CG.js +6 -0
- package/locale-data/fr-CH.d.ts +1 -0
- package/locale-data/fr-CH.js +6 -0
- package/locale-data/fr-CI.d.ts +1 -0
- package/locale-data/fr-CI.js +6 -0
- package/locale-data/fr-CM.d.ts +1 -0
- package/locale-data/fr-CM.js +6 -0
- package/locale-data/fr-DJ.d.ts +1 -0
- package/locale-data/fr-DJ.js +6 -0
- package/locale-data/fr-DZ.d.ts +1 -0
- package/locale-data/fr-DZ.js +6 -0
- package/locale-data/fr-GA.d.ts +1 -0
- package/locale-data/fr-GA.js +6 -0
- package/locale-data/fr-GF.d.ts +1 -0
- package/locale-data/fr-GF.js +6 -0
- package/locale-data/fr-GN.d.ts +1 -0
- package/locale-data/fr-GN.js +6 -0
- package/locale-data/fr-GP.d.ts +1 -0
- package/locale-data/fr-GP.js +6 -0
- package/locale-data/fr-GQ.d.ts +1 -0
- package/locale-data/fr-GQ.js +6 -0
- package/locale-data/fr-HT.d.ts +1 -0
- package/locale-data/fr-HT.js +6 -0
- package/locale-data/fr-KM.d.ts +1 -0
- package/locale-data/fr-KM.js +6 -0
- package/locale-data/fr-LU.d.ts +1 -0
- package/locale-data/fr-LU.js +6 -0
- package/locale-data/fr-MA.d.ts +1 -0
- package/locale-data/fr-MA.js +6 -0
- package/locale-data/fr-MC.d.ts +1 -0
- package/locale-data/fr-MC.js +6 -0
- package/locale-data/fr-MF.d.ts +1 -0
- package/locale-data/fr-MF.js +6 -0
- package/locale-data/fr-MG.d.ts +1 -0
- package/locale-data/fr-MG.js +6 -0
- package/locale-data/fr-ML.d.ts +1 -0
- package/locale-data/fr-ML.js +6 -0
- package/locale-data/fr-MQ.d.ts +1 -0
- package/locale-data/fr-MQ.js +6 -0
- package/locale-data/fr-MR.d.ts +1 -0
- package/locale-data/fr-MR.js +6 -0
- package/locale-data/fr-MU.d.ts +1 -0
- package/locale-data/fr-MU.js +6 -0
- package/locale-data/fr-NC.d.ts +1 -0
- package/locale-data/fr-NC.js +6 -0
- package/locale-data/fr-NE.d.ts +1 -0
- package/locale-data/fr-NE.js +6 -0
- package/locale-data/fr-PF.d.ts +1 -0
- package/locale-data/fr-PF.js +6 -0
- package/locale-data/fr-PM.d.ts +1 -0
- package/locale-data/fr-PM.js +6 -0
- package/locale-data/fr-RE.d.ts +1 -0
- package/locale-data/fr-RE.js +6 -0
- package/locale-data/fr-RW.d.ts +1 -0
- package/locale-data/fr-RW.js +6 -0
- package/locale-data/fr-SC.d.ts +1 -0
- package/locale-data/fr-SC.js +6 -0
- package/locale-data/fr-SN.d.ts +1 -0
- package/locale-data/fr-SN.js +6 -0
- package/locale-data/fr-SY.d.ts +1 -0
- package/locale-data/fr-SY.js +6 -0
- package/locale-data/fr-TD.d.ts +1 -0
- package/locale-data/fr-TD.js +6 -0
- package/locale-data/fr-TG.d.ts +1 -0
- package/locale-data/fr-TG.js +6 -0
- package/locale-data/fr-TN.d.ts +1 -0
- package/locale-data/fr-TN.js +6 -0
- package/locale-data/fr-VU.d.ts +1 -0
- package/locale-data/fr-VU.js +6 -0
- package/locale-data/fr-WF.d.ts +1 -0
- package/locale-data/fr-WF.js +6 -0
- package/locale-data/fr-YT.d.ts +1 -0
- package/locale-data/fr-YT.js +6 -0
- package/locale-data/fr.d.ts +1 -0
- package/locale-data/fr.js +6 -0
- package/locale-data/fur.d.ts +1 -0
- package/locale-data/fur.js +6 -0
- package/locale-data/fy.d.ts +1 -0
- package/locale-data/fy.js +6 -0
- package/locale-data/ga-GB.d.ts +1 -0
- package/locale-data/ga-GB.js +6 -0
- package/locale-data/ga.d.ts +1 -0
- package/locale-data/ga.js +6 -0
- package/locale-data/gd.d.ts +1 -0
- package/locale-data/gd.js +6 -0
- package/locale-data/gl.d.ts +1 -0
- package/locale-data/gl.js +6 -0
- package/locale-data/gsw-FR.d.ts +1 -0
- package/locale-data/gsw-FR.js +6 -0
- package/locale-data/gsw-LI.d.ts +1 -0
- package/locale-data/gsw-LI.js +6 -0
- package/locale-data/gsw.d.ts +1 -0
- package/locale-data/gsw.js +6 -0
- package/locale-data/gu.d.ts +1 -0
- package/locale-data/gu.js +6 -0
- package/locale-data/guz.d.ts +1 -0
- package/locale-data/guz.js +6 -0
- package/locale-data/gv.d.ts +1 -0
- package/locale-data/gv.js +6 -0
- package/locale-data/ha-GH.d.ts +1 -0
- package/locale-data/ha-GH.js +6 -0
- package/locale-data/ha-NE.d.ts +1 -0
- package/locale-data/ha-NE.js +6 -0
- package/locale-data/ha.d.ts +1 -0
- package/locale-data/ha.js +6 -0
- package/locale-data/haw.d.ts +1 -0
- package/locale-data/haw.js +6 -0
- package/locale-data/he.d.ts +1 -0
- package/locale-data/he.js +6 -0
- package/locale-data/hi.d.ts +1 -0
- package/locale-data/hi.js +6 -0
- package/locale-data/hr-BA.d.ts +1 -0
- package/locale-data/hr-BA.js +6 -0
- package/locale-data/hr.d.ts +1 -0
- package/locale-data/hr.js +6 -0
- package/locale-data/hsb.d.ts +1 -0
- package/locale-data/hsb.js +6 -0
- package/locale-data/hu.d.ts +1 -0
- package/locale-data/hu.js +6 -0
- package/locale-data/hy.d.ts +1 -0
- package/locale-data/hy.js +6 -0
- package/locale-data/ia.d.ts +1 -0
- package/locale-data/ia.js +6 -0
- package/locale-data/id.d.ts +1 -0
- package/locale-data/id.js +6 -0
- package/locale-data/ig.d.ts +1 -0
- package/locale-data/ig.js +6 -0
- package/locale-data/ii.d.ts +1 -0
- package/locale-data/ii.js +6 -0
- package/locale-data/is.d.ts +1 -0
- package/locale-data/is.js +6 -0
- package/locale-data/it-CH.d.ts +1 -0
- package/locale-data/it-CH.js +6 -0
- package/locale-data/it-SM.d.ts +1 -0
- package/locale-data/it-SM.js +6 -0
- package/locale-data/it-VA.d.ts +1 -0
- package/locale-data/it-VA.js +6 -0
- package/locale-data/it.d.ts +1 -0
- package/locale-data/it.js +6 -0
- package/locale-data/ja.d.ts +1 -0
- package/locale-data/ja.js +6 -0
- package/locale-data/jgo.d.ts +1 -0
- package/locale-data/jgo.js +6 -0
- package/locale-data/jmc.d.ts +1 -0
- package/locale-data/jmc.js +6 -0
- package/locale-data/jv.d.ts +1 -0
- package/locale-data/jv.js +6 -0
- package/locale-data/ka.d.ts +1 -0
- package/locale-data/ka.js +6 -0
- package/locale-data/kab.d.ts +1 -0
- package/locale-data/kab.js +6 -0
- package/locale-data/kam.d.ts +1 -0
- package/locale-data/kam.js +6 -0
- package/locale-data/kde.d.ts +1 -0
- package/locale-data/kde.js +6 -0
- package/locale-data/kea.d.ts +1 -0
- package/locale-data/kea.js +6 -0
- package/locale-data/khq.d.ts +1 -0
- package/locale-data/khq.js +6 -0
- package/locale-data/ki.d.ts +1 -0
- package/locale-data/ki.js +6 -0
- package/locale-data/kk.d.ts +1 -0
- package/locale-data/kk.js +6 -0
- package/locale-data/kkj.d.ts +1 -0
- package/locale-data/kkj.js +6 -0
- package/locale-data/kl.d.ts +1 -0
- package/locale-data/kl.js +6 -0
- package/locale-data/kln.d.ts +1 -0
- package/locale-data/kln.js +6 -0
- package/locale-data/km.d.ts +1 -0
- package/locale-data/km.js +6 -0
- package/locale-data/kn.d.ts +1 -0
- package/locale-data/kn.js +6 -0
- package/locale-data/ko-KP.d.ts +1 -0
- package/locale-data/ko-KP.js +6 -0
- package/locale-data/ko.d.ts +1 -0
- package/locale-data/ko.js +6 -0
- package/locale-data/kok.d.ts +1 -0
- package/locale-data/kok.js +6 -0
- package/locale-data/ks-Arab.d.ts +1 -0
- package/locale-data/ks-Arab.js +6 -0
- package/locale-data/ks.d.ts +1 -0
- package/locale-data/ks.js +6 -0
- package/locale-data/ksb.d.ts +1 -0
- package/locale-data/ksb.js +6 -0
- package/locale-data/ksf.d.ts +1 -0
- package/locale-data/ksf.js +6 -0
- package/locale-data/ksh.d.ts +1 -0
- package/locale-data/ksh.js +6 -0
- package/locale-data/ku.d.ts +1 -0
- package/locale-data/ku.js +6 -0
- package/locale-data/kw.d.ts +1 -0
- package/locale-data/kw.js +6 -0
- package/locale-data/ky.d.ts +1 -0
- package/locale-data/ky.js +6 -0
- package/locale-data/lag.d.ts +1 -0
- package/locale-data/lag.js +6 -0
- package/locale-data/lb.d.ts +1 -0
- package/locale-data/lb.js +6 -0
- package/locale-data/lg.d.ts +1 -0
- package/locale-data/lg.js +6 -0
- package/locale-data/lkt.d.ts +1 -0
- package/locale-data/lkt.js +6 -0
- package/locale-data/ln-AO.d.ts +1 -0
- package/locale-data/ln-AO.js +6 -0
- package/locale-data/ln-CF.d.ts +1 -0
- package/locale-data/ln-CF.js +6 -0
- package/locale-data/ln-CG.d.ts +1 -0
- package/locale-data/ln-CG.js +6 -0
- package/locale-data/ln.d.ts +1 -0
- package/locale-data/ln.js +6 -0
- package/locale-data/lo.d.ts +1 -0
- package/locale-data/lo.js +6 -0
- package/locale-data/lrc-IQ.d.ts +1 -0
- package/locale-data/lrc-IQ.js +6 -0
- package/locale-data/lrc.d.ts +1 -0
- package/locale-data/lrc.js +6 -0
- package/locale-data/lt.d.ts +1 -0
- package/locale-data/lt.js +6 -0
- package/locale-data/lu.d.ts +1 -0
- package/locale-data/lu.js +6 -0
- package/locale-data/luo.d.ts +1 -0
- package/locale-data/luo.js +6 -0
- package/locale-data/luy.d.ts +1 -0
- package/locale-data/luy.js +6 -0
- package/locale-data/lv.d.ts +1 -0
- package/locale-data/lv.js +6 -0
- package/locale-data/mai.d.ts +1 -0
- package/locale-data/mai.js +6 -0
- package/locale-data/mas-TZ.d.ts +1 -0
- package/locale-data/mas-TZ.js +6 -0
- package/locale-data/mas.d.ts +1 -0
- package/locale-data/mas.js +6 -0
- package/locale-data/mer.d.ts +1 -0
- package/locale-data/mer.js +6 -0
- package/locale-data/mfe.d.ts +1 -0
- package/locale-data/mfe.js +6 -0
- package/locale-data/mg.d.ts +1 -0
- package/locale-data/mg.js +6 -0
- package/locale-data/mgh.d.ts +1 -0
- package/locale-data/mgh.js +6 -0
- package/locale-data/mgo.d.ts +1 -0
- package/locale-data/mgo.js +6 -0
- package/locale-data/mi.d.ts +1 -0
- package/locale-data/mi.js +6 -0
- package/locale-data/mk.d.ts +1 -0
- package/locale-data/mk.js +6 -0
- package/locale-data/ml.d.ts +1 -0
- package/locale-data/ml.js +6 -0
- package/locale-data/mn.d.ts +1 -0
- package/locale-data/mn.js +6 -0
- package/locale-data/mni-Beng.d.ts +1 -0
- package/locale-data/mni-Beng.js +6 -0
- package/locale-data/mni.d.ts +1 -0
- package/locale-data/mni.js +6 -0
- package/locale-data/mr.d.ts +1 -0
- package/locale-data/mr.js +6 -0
- package/locale-data/ms-BN.d.ts +1 -0
- package/locale-data/ms-BN.js +6 -0
- package/locale-data/ms-ID.d.ts +1 -0
- package/locale-data/ms-ID.js +6 -0
- package/locale-data/ms-SG.d.ts +1 -0
- package/locale-data/ms-SG.js +6 -0
- package/locale-data/ms.d.ts +1 -0
- package/locale-data/ms.js +6 -0
- package/locale-data/mt.d.ts +1 -0
- package/locale-data/mt.js +6 -0
- package/locale-data/mua.d.ts +1 -0
- package/locale-data/mua.js +6 -0
- package/locale-data/my.d.ts +1 -0
- package/locale-data/my.js +6 -0
- package/locale-data/mzn.d.ts +1 -0
- package/locale-data/mzn.js +6 -0
- package/locale-data/naq.d.ts +1 -0
- package/locale-data/naq.js +6 -0
- package/locale-data/nb-SJ.d.ts +1 -0
- package/locale-data/nb-SJ.js +6 -0
- package/locale-data/nb.d.ts +1 -0
- package/locale-data/nb.js +6 -0
- package/locale-data/nd.d.ts +1 -0
- package/locale-data/nd.js +6 -0
- package/locale-data/nds-NL.d.ts +1 -0
- package/locale-data/nds-NL.js +6 -0
- package/locale-data/nds.d.ts +1 -0
- package/locale-data/nds.js +6 -0
- package/locale-data/ne-IN.d.ts +1 -0
- package/locale-data/ne-IN.js +6 -0
- package/locale-data/ne.d.ts +1 -0
- package/locale-data/ne.js +6 -0
- package/locale-data/nl-AW.d.ts +1 -0
- package/locale-data/nl-AW.js +6 -0
- package/locale-data/nl-BE.d.ts +1 -0
- package/locale-data/nl-BE.js +6 -0
- package/locale-data/nl-BQ.d.ts +1 -0
- package/locale-data/nl-BQ.js +6 -0
- package/locale-data/nl-CW.d.ts +1 -0
- package/locale-data/nl-CW.js +6 -0
- package/locale-data/nl-SR.d.ts +1 -0
- package/locale-data/nl-SR.js +6 -0
- package/locale-data/nl-SX.d.ts +1 -0
- package/locale-data/nl-SX.js +6 -0
- package/locale-data/nl.d.ts +1 -0
- package/locale-data/nl.js +6 -0
- package/locale-data/nmg.d.ts +1 -0
- package/locale-data/nmg.js +6 -0
- package/locale-data/nn.d.ts +1 -0
- package/locale-data/nn.js +6 -0
- package/locale-data/nnh.d.ts +1 -0
- package/locale-data/nnh.js +6 -0
- package/locale-data/no.d.ts +1 -0
- package/locale-data/no.js +6 -0
- package/locale-data/nus.d.ts +1 -0
- package/locale-data/nus.js +6 -0
- package/locale-data/nyn.d.ts +1 -0
- package/locale-data/nyn.js +6 -0
- package/locale-data/om-KE.d.ts +1 -0
- package/locale-data/om-KE.js +6 -0
- package/locale-data/om.d.ts +1 -0
- package/locale-data/om.js +6 -0
- package/locale-data/or.d.ts +1 -0
- package/locale-data/or.js +6 -0
- package/locale-data/os-RU.d.ts +1 -0
- package/locale-data/os-RU.js +6 -0
- package/locale-data/os.d.ts +1 -0
- package/locale-data/os.js +6 -0
- package/locale-data/pa-Arab.d.ts +1 -0
- package/locale-data/pa-Arab.js +6 -0
- package/locale-data/pa-Guru.d.ts +1 -0
- package/locale-data/pa-Guru.js +6 -0
- package/locale-data/pa.d.ts +1 -0
- package/locale-data/pa.js +6 -0
- package/locale-data/pcm.d.ts +1 -0
- package/locale-data/pcm.js +6 -0
- package/locale-data/pl.d.ts +1 -0
- package/locale-data/pl.js +6 -0
- package/locale-data/ps-PK.d.ts +1 -0
- package/locale-data/ps-PK.js +6 -0
- package/locale-data/ps.d.ts +1 -0
- package/locale-data/ps.js +6 -0
- package/locale-data/pt-AO.d.ts +1 -0
- package/locale-data/pt-AO.js +6 -0
- package/locale-data/pt-CH.d.ts +1 -0
- package/locale-data/pt-CH.js +6 -0
- package/locale-data/pt-CV.d.ts +1 -0
- package/locale-data/pt-CV.js +6 -0
- package/locale-data/pt-GQ.d.ts +1 -0
- package/locale-data/pt-GQ.js +6 -0
- package/locale-data/pt-GW.d.ts +1 -0
- package/locale-data/pt-GW.js +6 -0
- package/locale-data/pt-LU.d.ts +1 -0
- package/locale-data/pt-LU.js +6 -0
- package/locale-data/pt-MO.d.ts +1 -0
- package/locale-data/pt-MO.js +6 -0
- package/locale-data/pt-MZ.d.ts +1 -0
- package/locale-data/pt-MZ.js +6 -0
- package/locale-data/pt-PT.d.ts +1 -0
- package/locale-data/pt-PT.js +6 -0
- package/locale-data/pt-ST.d.ts +1 -0
- package/locale-data/pt-ST.js +6 -0
- package/locale-data/pt-TL.d.ts +1 -0
- package/locale-data/pt-TL.js +6 -0
- package/locale-data/pt.d.ts +1 -0
- package/locale-data/pt.js +6 -0
- package/locale-data/qu-BO.d.ts +1 -0
- package/locale-data/qu-BO.js +6 -0
- package/locale-data/qu-EC.d.ts +1 -0
- package/locale-data/qu-EC.js +6 -0
- package/locale-data/qu.d.ts +1 -0
- package/locale-data/qu.js +6 -0
- package/locale-data/rm.d.ts +1 -0
- package/locale-data/rm.js +6 -0
- package/locale-data/rn.d.ts +1 -0
- package/locale-data/rn.js +6 -0
- package/locale-data/ro-MD.d.ts +1 -0
- package/locale-data/ro-MD.js +6 -0
- package/locale-data/ro.d.ts +1 -0
- package/locale-data/ro.js +6 -0
- package/locale-data/rof.d.ts +1 -0
- package/locale-data/rof.js +6 -0
- package/locale-data/ru-BY.d.ts +1 -0
- package/locale-data/ru-BY.js +6 -0
- package/locale-data/ru-KG.d.ts +1 -0
- package/locale-data/ru-KG.js +6 -0
- package/locale-data/ru-KZ.d.ts +1 -0
- package/locale-data/ru-KZ.js +6 -0
- package/locale-data/ru-MD.d.ts +1 -0
- package/locale-data/ru-MD.js +6 -0
- package/locale-data/ru-UA.d.ts +1 -0
- package/locale-data/ru-UA.js +6 -0
- package/locale-data/ru.d.ts +1 -0
- package/locale-data/ru.js +6 -0
- package/locale-data/rw.d.ts +1 -0
- package/locale-data/rw.js +6 -0
- package/locale-data/rwk.d.ts +1 -0
- package/locale-data/rwk.js +6 -0
- package/locale-data/sa.d.ts +1 -0
- package/locale-data/sa.js +6 -0
- package/locale-data/sah.d.ts +1 -0
- package/locale-data/sah.js +6 -0
- package/locale-data/saq.d.ts +1 -0
- package/locale-data/saq.js +6 -0
- package/locale-data/sat-Olck.d.ts +1 -0
- package/locale-data/sat-Olck.js +6 -0
- package/locale-data/sat.d.ts +1 -0
- package/locale-data/sat.js +6 -0
- package/locale-data/sbp.d.ts +1 -0
- package/locale-data/sbp.js +6 -0
- package/locale-data/sd-Arab.d.ts +1 -0
- package/locale-data/sd-Arab.js +6 -0
- package/locale-data/sd-Deva.d.ts +1 -0
- package/locale-data/sd-Deva.js +6 -0
- package/locale-data/sd.d.ts +1 -0
- package/locale-data/sd.js +6 -0
- package/locale-data/se-FI.d.ts +1 -0
- package/locale-data/se-FI.js +6 -0
- package/locale-data/se-SE.d.ts +1 -0
- package/locale-data/se-SE.js +6 -0
- package/locale-data/se.d.ts +1 -0
- package/locale-data/se.js +6 -0
- package/locale-data/seh.d.ts +1 -0
- package/locale-data/seh.js +6 -0
- package/locale-data/ses.d.ts +1 -0
- package/locale-data/ses.js +6 -0
- package/locale-data/sg.d.ts +1 -0
- package/locale-data/sg.js +6 -0
- package/locale-data/shi-Latn.d.ts +1 -0
- package/locale-data/shi-Latn.js +6 -0
- package/locale-data/shi-Tfng.d.ts +1 -0
- package/locale-data/shi-Tfng.js +6 -0
- package/locale-data/shi.d.ts +1 -0
- package/locale-data/shi.js +6 -0
- package/locale-data/si.d.ts +1 -0
- package/locale-data/si.js +6 -0
- package/locale-data/sk.d.ts +1 -0
- package/locale-data/sk.js +6 -0
- package/locale-data/sl.d.ts +1 -0
- package/locale-data/sl.js +6 -0
- package/locale-data/smn.d.ts +1 -0
- package/locale-data/smn.js +6 -0
- package/locale-data/sn.d.ts +1 -0
- package/locale-data/sn.js +6 -0
- package/locale-data/so-DJ.d.ts +1 -0
- package/locale-data/so-DJ.js +6 -0
- package/locale-data/so-ET.d.ts +1 -0
- package/locale-data/so-ET.js +6 -0
- package/locale-data/so-KE.d.ts +1 -0
- package/locale-data/so-KE.js +6 -0
- package/locale-data/so.d.ts +1 -0
- package/locale-data/so.js +6 -0
- package/locale-data/sq-MK.d.ts +1 -0
- package/locale-data/sq-MK.js +6 -0
- package/locale-data/sq-XK.d.ts +1 -0
- package/locale-data/sq-XK.js +6 -0
- package/locale-data/sq.d.ts +1 -0
- package/locale-data/sq.js +6 -0
- package/locale-data/sr-Cyrl-BA.d.ts +1 -0
- package/locale-data/sr-Cyrl-BA.js +6 -0
- package/locale-data/sr-Cyrl-ME.d.ts +1 -0
- package/locale-data/sr-Cyrl-ME.js +6 -0
- package/locale-data/sr-Cyrl-XK.d.ts +1 -0
- package/locale-data/sr-Cyrl-XK.js +6 -0
- package/locale-data/sr-Cyrl.d.ts +1 -0
- package/locale-data/sr-Cyrl.js +6 -0
- package/locale-data/sr-Latn-BA.d.ts +1 -0
- package/locale-data/sr-Latn-BA.js +6 -0
- package/locale-data/sr-Latn-ME.d.ts +1 -0
- package/locale-data/sr-Latn-ME.js +6 -0
- package/locale-data/sr-Latn-XK.d.ts +1 -0
- package/locale-data/sr-Latn-XK.js +6 -0
- package/locale-data/sr-Latn.d.ts +1 -0
- package/locale-data/sr-Latn.js +6 -0
- package/locale-data/sr.d.ts +1 -0
- package/locale-data/sr.js +6 -0
- package/locale-data/su-Latn.d.ts +1 -0
- package/locale-data/su-Latn.js +6 -0
- package/locale-data/su.d.ts +1 -0
- package/locale-data/su.js +6 -0
- package/locale-data/sv-AX.d.ts +1 -0
- package/locale-data/sv-AX.js +6 -0
- package/locale-data/sv-FI.d.ts +1 -0
- package/locale-data/sv-FI.js +6 -0
- package/locale-data/sv.d.ts +1 -0
- package/locale-data/sv.js +6 -0
- package/locale-data/sw-CD.d.ts +1 -0
- package/locale-data/sw-CD.js +6 -0
- package/locale-data/sw-KE.d.ts +1 -0
- package/locale-data/sw-KE.js +6 -0
- package/locale-data/sw-UG.d.ts +1 -0
- package/locale-data/sw-UG.js +6 -0
- package/locale-data/sw.d.ts +1 -0
- package/locale-data/sw.js +6 -0
- package/locale-data/ta-LK.d.ts +1 -0
- package/locale-data/ta-LK.js +6 -0
- package/locale-data/ta-MY.d.ts +1 -0
- package/locale-data/ta-MY.js +6 -0
- package/locale-data/ta-SG.d.ts +1 -0
- package/locale-data/ta-SG.js +6 -0
- package/locale-data/ta.d.ts +1 -0
- package/locale-data/ta.js +6 -0
- package/locale-data/te.d.ts +1 -0
- package/locale-data/te.js +6 -0
- package/locale-data/teo-KE.d.ts +1 -0
- package/locale-data/teo-KE.js +6 -0
- package/locale-data/teo.d.ts +1 -0
- package/locale-data/teo.js +6 -0
- package/locale-data/tg.d.ts +1 -0
- package/locale-data/tg.js +6 -0
- package/locale-data/th.d.ts +1 -0
- package/locale-data/th.js +6 -0
- package/locale-data/ti-ER.d.ts +1 -0
- package/locale-data/ti-ER.js +6 -0
- package/locale-data/ti.d.ts +1 -0
- package/locale-data/ti.js +6 -0
- package/locale-data/tk.d.ts +1 -0
- package/locale-data/tk.js +6 -0
- package/locale-data/to.d.ts +1 -0
- package/locale-data/to.js +6 -0
- package/locale-data/tr-CY.d.ts +1 -0
- package/locale-data/tr-CY.js +6 -0
- package/locale-data/tr.d.ts +1 -0
- package/locale-data/tr.js +6 -0
- package/locale-data/tt.d.ts +1 -0
- package/locale-data/tt.js +6 -0
- package/locale-data/twq.d.ts +1 -0
- package/locale-data/twq.js +6 -0
- package/locale-data/tzm.d.ts +1 -0
- package/locale-data/tzm.js +6 -0
- package/locale-data/ug.d.ts +1 -0
- package/locale-data/ug.js +6 -0
- package/locale-data/uk.d.ts +1 -0
- package/locale-data/uk.js +6 -0
- package/locale-data/ur-IN.d.ts +1 -0
- package/locale-data/ur-IN.js +6 -0
- package/locale-data/ur.d.ts +1 -0
- package/locale-data/ur.js +6 -0
- package/locale-data/uz-Arab.d.ts +1 -0
- package/locale-data/uz-Arab.js +6 -0
- package/locale-data/uz-Cyrl.d.ts +1 -0
- package/locale-data/uz-Cyrl.js +6 -0
- package/locale-data/uz-Latn.d.ts +1 -0
- package/locale-data/uz-Latn.js +6 -0
- package/locale-data/uz.d.ts +1 -0
- package/locale-data/uz.js +6 -0
- package/locale-data/vai-Latn.d.ts +1 -0
- package/locale-data/vai-Latn.js +6 -0
- package/locale-data/vai-Vaii.d.ts +1 -0
- package/locale-data/vai-Vaii.js +6 -0
- package/locale-data/vai.d.ts +1 -0
- package/locale-data/vai.js +6 -0
- package/locale-data/vi.d.ts +1 -0
- package/locale-data/vi.js +6 -0
- package/locale-data/vun.d.ts +1 -0
- package/locale-data/vun.js +6 -0
- package/locale-data/wae.d.ts +1 -0
- package/locale-data/wae.js +6 -0
- package/locale-data/wo.d.ts +1 -0
- package/locale-data/wo.js +6 -0
- package/locale-data/xh.d.ts +1 -0
- package/locale-data/xh.js +6 -0
- package/locale-data/xog.d.ts +1 -0
- package/locale-data/xog.js +6 -0
- package/locale-data/yav.d.ts +1 -0
- package/locale-data/yav.js +6 -0
- package/locale-data/yi.d.ts +1 -0
- package/locale-data/yi.js +6 -0
- package/locale-data/yo-BJ.d.ts +1 -0
- package/locale-data/yo-BJ.js +6 -0
- package/locale-data/yo.d.ts +1 -0
- package/locale-data/yo.js +6 -0
- package/locale-data/yue-Hans.d.ts +1 -0
- package/locale-data/yue-Hans.js +6 -0
- package/locale-data/yue-Hant.d.ts +1 -0
- package/locale-data/yue-Hant.js +6 -0
- package/locale-data/yue.d.ts +1 -0
- package/locale-data/yue.js +6 -0
- package/locale-data/zgh.d.ts +1 -0
- package/locale-data/zgh.js +6 -0
- package/locale-data/zh-Hans-HK.d.ts +1 -0
- package/locale-data/zh-Hans-HK.js +6 -0
- package/locale-data/zh-Hans-MO.d.ts +1 -0
- package/locale-data/zh-Hans-MO.js +6 -0
- package/locale-data/zh-Hans-SG.d.ts +1 -0
- package/locale-data/zh-Hans-SG.js +6 -0
- package/locale-data/zh-Hans.d.ts +1 -0
- package/locale-data/zh-Hans.js +6 -0
- package/locale-data/zh-Hant-HK.d.ts +1 -0
- package/locale-data/zh-Hant-HK.js +6 -0
- package/locale-data/zh-Hant-MO.d.ts +1 -0
- package/locale-data/zh-Hant-MO.js +6 -0
- package/locale-data/zh-Hant.d.ts +1 -0
- package/locale-data/zh-Hant.js +6 -0
- package/locale-data/zh.d.ts +1 -0
- package/locale-data/zh.js +6 -0
- package/locale-data/zu.d.ts +1 -0
- package/locale-data/zu.js +6 -0
- package/package.json +32 -0
- package/polyfill-force.d.ts +2 -0
- package/polyfill-force.d.ts.map +1 -0
- package/polyfill-force.js +10 -0
- package/polyfill.d.ts +2 -0
- package/polyfill.d.ts.map +1 -0
- package/polyfill.iife.js +881 -0
- package/polyfill.js +13 -0
- package/should-polyfill.d.ts +2 -0
- package/should-polyfill.d.ts.map +1 -0
- package/should-polyfill.js +28 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 FormatJS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function FormatRelativeTime(rtf: Intl.RelativeTimeFormat, value: number, unit: Intl.RelativeTimeFormatUnit, implDetails: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
}): string;
|
|
5
|
+
//# sourceMappingURL=FormatRelativeTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatRelativeTime.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-relativetimeformat/abstract/FormatRelativeTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0BAA0B,EAAC,MAAM,4BAA4B,CAAA;AAGrE,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,WAAW,EAAE;IACX,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;CAC3E,GACA,MAAM,CAOR"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormatRelativeTime = void 0;
|
|
4
|
+
var PartitionRelativeTimePattern_1 = require("./PartitionRelativeTimePattern");
|
|
5
|
+
function FormatRelativeTime(rtf, value, unit, implDetails) {
|
|
6
|
+
var parts = PartitionRelativeTimePattern_1.PartitionRelativeTimePattern(rtf, value, unit, implDetails);
|
|
7
|
+
var result = '';
|
|
8
|
+
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
|
9
|
+
var part = parts_1[_i];
|
|
10
|
+
result += part.value;
|
|
11
|
+
}
|
|
12
|
+
return result;
|
|
13
|
+
}
|
|
14
|
+
exports.FormatRelativeTime = FormatRelativeTime;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function FormatRelativeTimeToParts(rtf: Intl.RelativeTimeFormat, value: number, unit: Intl.RelativeTimeFormatUnit, implDetails: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
}): Intl.RelativeTimeFormatPart[];
|
|
5
|
+
//# sourceMappingURL=FormatRelativeTimeToParts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatRelativeTimeToParts.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-relativetimeformat/abstract/FormatRelativeTimeToParts.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,0BAA0B,EAC3B,MAAM,4BAA4B,CAAA;AAGnC,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,WAAW,EAAE;IACX,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;CAC3E,GACA,IAAI,CAAC,sBAAsB,EAAE,CAe/B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormatRelativeTimeToParts = void 0;
|
|
4
|
+
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
+
var PartitionRelativeTimePattern_1 = require("./PartitionRelativeTimePattern");
|
|
6
|
+
function FormatRelativeTimeToParts(rtf, value, unit, implDetails) {
|
|
7
|
+
var parts = PartitionRelativeTimePattern_1.PartitionRelativeTimePattern(rtf, value, unit, implDetails);
|
|
8
|
+
var result = ecma402_abstract_1.ArrayCreate(0);
|
|
9
|
+
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
|
10
|
+
var part = parts_1[_i];
|
|
11
|
+
var o = {
|
|
12
|
+
type: part.type,
|
|
13
|
+
value: part.value,
|
|
14
|
+
};
|
|
15
|
+
if ('unit' in part) {
|
|
16
|
+
o.unit = part.unit;
|
|
17
|
+
}
|
|
18
|
+
result.push(o);
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
exports.FormatRelativeTimeToParts = FormatRelativeTimeToParts;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal, LocaleFieldsData } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function InitializeRelativeTimeFormat(rtf: Intl.RelativeTimeFormat, locales: string | string[] | undefined, options: Intl.RelativeTimeFormatOptions | undefined, { getInternalSlots, availableLocales, relevantExtensionKeys, localeData, getDefaultLocale, }: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
availableLocales: Set<string>;
|
|
5
|
+
relevantExtensionKeys: string[];
|
|
6
|
+
localeData: Record<string, LocaleFieldsData | undefined>;
|
|
7
|
+
getDefaultLocale(): string;
|
|
8
|
+
}): Intl.RelativeTimeFormat;
|
|
9
|
+
//# sourceMappingURL=InitializeRelativeTimeFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitializeRelativeTimeFormat.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-relativetimeformat/abstract/InitializeRelativeTimeFormat.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAKjB,MAAM,4BAA4B,CAAA;AAKnC,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EACtC,OAAO,EAAE,IAAI,CAAC,yBAAyB,GAAG,SAAS,EACnD,EACE,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,gBAAgB,GACjB,EAAE;IACD,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;IAC1E,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,qBAAqB,EAAE,MAAM,EAAE,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC,CAAA;IACxD,gBAAgB,IAAI,MAAM,CAAA;CAC3B,2BA4DF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InitializeRelativeTimeFormat = void 0;
|
|
4
|
+
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
+
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
6
|
+
var NUMBERING_SYSTEM_REGEX = /^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i;
|
|
7
|
+
function InitializeRelativeTimeFormat(rtf, locales, options, _a) {
|
|
8
|
+
var getInternalSlots = _a.getInternalSlots, availableLocales = _a.availableLocales, relevantExtensionKeys = _a.relevantExtensionKeys, localeData = _a.localeData, getDefaultLocale = _a.getDefaultLocale;
|
|
9
|
+
var internalSlots = getInternalSlots(rtf);
|
|
10
|
+
internalSlots.initializedRelativeTimeFormat = true;
|
|
11
|
+
var requestedLocales = ecma402_abstract_1.CanonicalizeLocaleList(locales);
|
|
12
|
+
var opt = Object.create(null);
|
|
13
|
+
var opts = ecma402_abstract_1.CoerceOptionsToObject(options);
|
|
14
|
+
var matcher = ecma402_abstract_1.GetOption(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit');
|
|
15
|
+
opt.localeMatcher = matcher;
|
|
16
|
+
var numberingSystem = ecma402_abstract_1.GetOption(opts,
|
|
17
|
+
// @ts-expect-error TS option is wack
|
|
18
|
+
'numberingSystem', 'string', undefined, undefined);
|
|
19
|
+
if (numberingSystem !== undefined) {
|
|
20
|
+
if (!NUMBERING_SYSTEM_REGEX.test(numberingSystem)) {
|
|
21
|
+
throw new RangeError("Invalid numbering system " + numberingSystem);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
opt.nu = numberingSystem;
|
|
25
|
+
var r = intl_localematcher_1.ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);
|
|
26
|
+
var locale = r.locale, nu = r.nu;
|
|
27
|
+
internalSlots.locale = locale;
|
|
28
|
+
internalSlots.style = ecma402_abstract_1.GetOption(opts, 'style', 'string', ['long', 'narrow', 'short'], 'long');
|
|
29
|
+
internalSlots.numeric = ecma402_abstract_1.GetOption(opts, 'numeric', 'string', ['always', 'auto'], 'always');
|
|
30
|
+
var fields = localeData[r.dataLocale];
|
|
31
|
+
ecma402_abstract_1.invariant(!!fields, "Missing locale data for " + r.dataLocale);
|
|
32
|
+
internalSlots.fields = fields;
|
|
33
|
+
internalSlots.numberFormat = new Intl.NumberFormat(locales);
|
|
34
|
+
internalSlots.pluralRules = new Intl.PluralRules(locales);
|
|
35
|
+
internalSlots.numberingSystem = nu;
|
|
36
|
+
return rtf;
|
|
37
|
+
}
|
|
38
|
+
exports.InitializeRelativeTimeFormat = InitializeRelativeTimeFormat;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MakePartsList.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-relativetimeformat/abstract/MakePartsList.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,sBAAsB,EAAE,iCAsB/D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MakePartsList = void 0;
|
|
4
|
+
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
+
function MakePartsList(pattern, unit, parts) {
|
|
6
|
+
var patternParts = ecma402_abstract_1.PartitionPattern(pattern);
|
|
7
|
+
var result = [];
|
|
8
|
+
for (var _i = 0, patternParts_1 = patternParts; _i < patternParts_1.length; _i++) {
|
|
9
|
+
var patternPart = patternParts_1[_i];
|
|
10
|
+
if (patternPart.type === 'literal') {
|
|
11
|
+
result.push({
|
|
12
|
+
type: 'literal',
|
|
13
|
+
value: patternPart.value,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
ecma402_abstract_1.invariant(patternPart.type === '0', "Malformed pattern " + pattern);
|
|
18
|
+
for (var _a = 0, parts_1 = parts; _a < parts_1.length; _a++) {
|
|
19
|
+
var part = parts_1[_a];
|
|
20
|
+
result.push({
|
|
21
|
+
type: part.type,
|
|
22
|
+
value: part.value,
|
|
23
|
+
unit: unit,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
exports.MakePartsList = MakePartsList;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function PartitionRelativeTimePattern(rtf: Intl.RelativeTimeFormat, value: number, unit: Intl.RelativeTimeFormatUnit, { getInternalSlots, }: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
}): Intl.RelativeTimeFormatPart[];
|
|
5
|
+
//# sourceMappingURL=PartitionRelativeTimePattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartitionRelativeTimePattern.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-relativetimeformat/abstract/PartitionRelativeTimePattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,0BAA0B,EAI3B,MAAM,4BAA4B,CAAA;AAInC,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,EACE,gBAAgB,GACjB,EAAE;IACD,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;CAC3E,GACA,IAAI,CAAC,sBAAsB,EAAE,CA0D/B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartitionRelativeTimePattern = void 0;
|
|
4
|
+
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
+
var SingularRelativeTimeUnit_1 = require("./SingularRelativeTimeUnit");
|
|
6
|
+
var MakePartsList_1 = require("./MakePartsList");
|
|
7
|
+
function PartitionRelativeTimePattern(rtf, value, unit, _a) {
|
|
8
|
+
var getInternalSlots = _a.getInternalSlots;
|
|
9
|
+
ecma402_abstract_1.invariant(ecma402_abstract_1.Type(value) === 'Number', "value must be number, instead got " + typeof value, TypeError);
|
|
10
|
+
ecma402_abstract_1.invariant(ecma402_abstract_1.Type(unit) === 'String', "unit must be number, instead got " + typeof value, TypeError);
|
|
11
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
12
|
+
throw new RangeError("Invalid value " + value);
|
|
13
|
+
}
|
|
14
|
+
var resolvedUnit = SingularRelativeTimeUnit_1.SingularRelativeTimeUnit(unit);
|
|
15
|
+
var _b = getInternalSlots(rtf), fields = _b.fields, style = _b.style, numeric = _b.numeric, pluralRules = _b.pluralRules, numberFormat = _b.numberFormat;
|
|
16
|
+
var entry = resolvedUnit;
|
|
17
|
+
if (style === 'short') {
|
|
18
|
+
entry = resolvedUnit + "-short";
|
|
19
|
+
}
|
|
20
|
+
else if (style === 'narrow') {
|
|
21
|
+
entry = resolvedUnit + "-narrow";
|
|
22
|
+
}
|
|
23
|
+
if (!(entry in fields)) {
|
|
24
|
+
entry = resolvedUnit;
|
|
25
|
+
}
|
|
26
|
+
var patterns = fields[entry];
|
|
27
|
+
if (numeric === 'auto') {
|
|
28
|
+
if (ecma402_abstract_1.ToString(value) in patterns) {
|
|
29
|
+
return [
|
|
30
|
+
{
|
|
31
|
+
type: 'literal',
|
|
32
|
+
value: patterns[ecma402_abstract_1.ToString(value)],
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
var tl = 'future';
|
|
38
|
+
if (ecma402_abstract_1.SameValue(value, -0) || value < 0) {
|
|
39
|
+
tl = 'past';
|
|
40
|
+
}
|
|
41
|
+
var po = patterns[tl];
|
|
42
|
+
var fv = typeof numberFormat.formatToParts === 'function'
|
|
43
|
+
? numberFormat.formatToParts(Math.abs(value))
|
|
44
|
+
: // TODO: If formatToParts is not supported, we assume the whole formatted
|
|
45
|
+
// number is a part
|
|
46
|
+
[
|
|
47
|
+
{
|
|
48
|
+
type: 'literal',
|
|
49
|
+
value: numberFormat.format(Math.abs(value)),
|
|
50
|
+
unit: unit,
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
var pr = pluralRules.select(value);
|
|
54
|
+
var pattern = po[pr];
|
|
55
|
+
return MakePartsList_1.MakePartsList(pattern, resolvedUnit, fv);
|
|
56
|
+
}
|
|
57
|
+
exports.PartitionRelativeTimePattern = PartitionRelativeTimePattern;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RelativeTimeFormatSingularUnit } from '@formatjs/ecma402-abstract';
|
|
2
|
+
/**
|
|
3
|
+
* https://tc39.es/proposal-intl-relative-time/#sec-singularrelativetimeunit
|
|
4
|
+
* @param unit
|
|
5
|
+
*/
|
|
6
|
+
export declare function SingularRelativeTimeUnit(unit: Intl.RelativeTimeFormatUnit): RelativeTimeFormatSingularUnit;
|
|
7
|
+
//# sourceMappingURL=SingularRelativeTimeUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingularRelativeTimeUnit.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-relativetimeformat/abstract/SingularRelativeTimeUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,EAE/B,MAAM,4BAA4B,CAAA;AAEnC;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,CAAC,sBAAsB,GAChC,8BAA8B,CAuBhC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SingularRelativeTimeUnit = void 0;
|
|
4
|
+
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
+
/**
|
|
6
|
+
* https://tc39.es/proposal-intl-relative-time/#sec-singularrelativetimeunit
|
|
7
|
+
* @param unit
|
|
8
|
+
*/
|
|
9
|
+
function SingularRelativeTimeUnit(unit) {
|
|
10
|
+
ecma402_abstract_1.invariant(ecma402_abstract_1.Type(unit) === 'String', 'unit must be a string');
|
|
11
|
+
if (unit === 'seconds')
|
|
12
|
+
return 'second';
|
|
13
|
+
if (unit === 'minutes')
|
|
14
|
+
return 'minute';
|
|
15
|
+
if (unit === 'hours')
|
|
16
|
+
return 'hour';
|
|
17
|
+
if (unit === 'days')
|
|
18
|
+
return 'day';
|
|
19
|
+
if (unit === 'weeks')
|
|
20
|
+
return 'week';
|
|
21
|
+
if (unit === 'months')
|
|
22
|
+
return 'month';
|
|
23
|
+
if (unit === 'quarters')
|
|
24
|
+
return 'quarter';
|
|
25
|
+
if (unit === 'years')
|
|
26
|
+
return 'year';
|
|
27
|
+
if (unit !== 'second' &&
|
|
28
|
+
unit !== 'minute' &&
|
|
29
|
+
unit !== 'hour' &&
|
|
30
|
+
unit !== 'day' &&
|
|
31
|
+
unit !== 'week' &&
|
|
32
|
+
unit !== 'month' &&
|
|
33
|
+
unit !== 'quarter' &&
|
|
34
|
+
unit !== 'year') {
|
|
35
|
+
throw new RangeError('invalid unit');
|
|
36
|
+
}
|
|
37
|
+
return unit;
|
|
38
|
+
}
|
|
39
|
+
exports.SingularRelativeTimeUnit = SingularRelativeTimeUnit;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_internal_slots.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-relativetimeformat/get_internal_slots.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,0BAA0B,EAAC,MAAM,4BAA4B,CAAA;AAOrE,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,CAAC,EAAE,IAAI,CAAC,kBAAkB,GACzB,0BAA0B,CAO5B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Type-only circular import
|
|
3
|
+
// eslint-disable-next-line import/no-cycle
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var internalSlotMap = new WeakMap();
|
|
6
|
+
function getInternalSlots(x) {
|
|
7
|
+
var internalSlots = internalSlotMap.get(x);
|
|
8
|
+
if (!internalSlots) {
|
|
9
|
+
internalSlots = Object.create(null);
|
|
10
|
+
internalSlotMap.set(x, internalSlots);
|
|
11
|
+
}
|
|
12
|
+
return internalSlots;
|
|
13
|
+
}
|
|
14
|
+
exports.default = getInternalSlots;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LocaleFieldsData, RelativeTimeLocaleData } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export default class RelativeTimeFormat {
|
|
3
|
+
constructor(locales?: string | string[], options?: Intl.RelativeTimeFormatOptions);
|
|
4
|
+
format(value: number, unit: Intl.RelativeTimeFormatUnit): string;
|
|
5
|
+
formatToParts(value: number, unit: Intl.RelativeTimeFormatUnit): Intl.RelativeTimeFormatPart[];
|
|
6
|
+
resolvedOptions(): Intl.ResolvedRelativeTimeFormatOptions;
|
|
7
|
+
static supportedLocalesOf(locales: string | string[], options?: Pick<Intl.RelativeTimeFormatOptions, 'localeMatcher'>): string[];
|
|
8
|
+
static __addLocaleData(...data: RelativeTimeLocaleData[]): void;
|
|
9
|
+
static localeData: Record<string, LocaleFieldsData>;
|
|
10
|
+
private static availableLocales;
|
|
11
|
+
private static __defaultLocale;
|
|
12
|
+
private static getDefaultLocale;
|
|
13
|
+
private static relevantExtensionKeys;
|
|
14
|
+
static polyfilled: boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-relativetimeformat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,sBAAsB,EAGvB,MAAM,4BAA4B,CAAA;AAKnC,MAAM,CAAC,OAAO,OAAO,kBAAkB;gBAEnC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,yBAAyB;IAiB1C,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,sBAAsB,GAAG,MAAM;IAmBhE,aAAa,CACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,GAChC,IAAI,CAAC,sBAAsB,EAAE;IAgBhC,eAAe,IAAI,IAAI,CAAC,iCAAiC;WAkB3C,kBAAkB,CAC9B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,eAAe,CAAC,GAC9D,MAAM,EAAE;WAQG,eAAe,CAAC,GAAG,IAAI,EAAE,sBAAsB,EAAE,GAAG,IAAI;IAetE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAK;IACxD,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAoB;IACnD,OAAO,CAAC,MAAM,CAAC,eAAe,CAAK;IACnC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAG/B,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAS;IAC7C,OAAc,UAAU,UAAO;CAChC"}
|
package/index.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
+
var InitializeRelativeTimeFormat_1 = require("./abstract/InitializeRelativeTimeFormat");
|
|
6
|
+
var PartitionRelativeTimePattern_1 = require("./abstract/PartitionRelativeTimePattern");
|
|
7
|
+
var get_internal_slots_1 = tslib_1.__importDefault(require("./get_internal_slots"));
|
|
8
|
+
var RelativeTimeFormat = /** @class */ (function () {
|
|
9
|
+
function RelativeTimeFormat(locales, options) {
|
|
10
|
+
// test262/test/intl402/RelativeTimeFormat/constructor/constructor/newtarget-undefined.js
|
|
11
|
+
// Cannot use `new.target` bc of IE11 & TS transpiles it to something else
|
|
12
|
+
var newTarget = this && this instanceof RelativeTimeFormat ? this.constructor : void 0;
|
|
13
|
+
if (!newTarget) {
|
|
14
|
+
throw new TypeError("Intl.RelativeTimeFormat must be called with 'new'");
|
|
15
|
+
}
|
|
16
|
+
return InitializeRelativeTimeFormat_1.InitializeRelativeTimeFormat(this, locales, options, {
|
|
17
|
+
getInternalSlots: get_internal_slots_1.default,
|
|
18
|
+
availableLocales: RelativeTimeFormat.availableLocales,
|
|
19
|
+
relevantExtensionKeys: RelativeTimeFormat.relevantExtensionKeys,
|
|
20
|
+
localeData: RelativeTimeFormat.localeData,
|
|
21
|
+
getDefaultLocale: RelativeTimeFormat.getDefaultLocale,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
RelativeTimeFormat.prototype.format = function (value, unit) {
|
|
25
|
+
if (typeof this !== 'object') {
|
|
26
|
+
throw new TypeError('format was called on a non-object');
|
|
27
|
+
}
|
|
28
|
+
var internalSlots = get_internal_slots_1.default(this);
|
|
29
|
+
if (!internalSlots.initializedRelativeTimeFormat) {
|
|
30
|
+
throw new TypeError('format was called on a invalid context');
|
|
31
|
+
}
|
|
32
|
+
return PartitionRelativeTimePattern_1.PartitionRelativeTimePattern(this, Number(value), ecma402_abstract_1.ToString(unit), {
|
|
33
|
+
getInternalSlots: get_internal_slots_1.default,
|
|
34
|
+
})
|
|
35
|
+
.map(function (el) { return el.value; })
|
|
36
|
+
.join('');
|
|
37
|
+
};
|
|
38
|
+
RelativeTimeFormat.prototype.formatToParts = function (value, unit) {
|
|
39
|
+
if (typeof this !== 'object') {
|
|
40
|
+
throw new TypeError('formatToParts was called on a non-object');
|
|
41
|
+
}
|
|
42
|
+
var internalSlots = get_internal_slots_1.default(this);
|
|
43
|
+
if (!internalSlots.initializedRelativeTimeFormat) {
|
|
44
|
+
throw new TypeError('formatToParts was called on a invalid context');
|
|
45
|
+
}
|
|
46
|
+
return PartitionRelativeTimePattern_1.PartitionRelativeTimePattern(this, Number(value), ecma402_abstract_1.ToString(unit), { getInternalSlots: get_internal_slots_1.default });
|
|
47
|
+
};
|
|
48
|
+
RelativeTimeFormat.prototype.resolvedOptions = function () {
|
|
49
|
+
if (typeof this !== 'object') {
|
|
50
|
+
throw new TypeError('resolvedOptions was called on a non-object');
|
|
51
|
+
}
|
|
52
|
+
var internalSlots = get_internal_slots_1.default(this);
|
|
53
|
+
if (!internalSlots.initializedRelativeTimeFormat) {
|
|
54
|
+
throw new TypeError('resolvedOptions was called on a invalid context');
|
|
55
|
+
}
|
|
56
|
+
// test262/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/type.js
|
|
57
|
+
return {
|
|
58
|
+
locale: internalSlots.locale,
|
|
59
|
+
style: internalSlots.style,
|
|
60
|
+
numeric: internalSlots.numeric,
|
|
61
|
+
numberingSystem: internalSlots.numberingSystem,
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
RelativeTimeFormat.supportedLocalesOf = function (locales, options) {
|
|
65
|
+
return ecma402_abstract_1.SupportedLocales(RelativeTimeFormat.availableLocales, ecma402_abstract_1.CanonicalizeLocaleList(locales), options);
|
|
66
|
+
};
|
|
67
|
+
RelativeTimeFormat.__addLocaleData = function () {
|
|
68
|
+
var data = [];
|
|
69
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
70
|
+
data[_i] = arguments[_i];
|
|
71
|
+
}
|
|
72
|
+
for (var _a = 0, data_1 = data; _a < data_1.length; _a++) {
|
|
73
|
+
var _b = data_1[_a], d = _b.data, locale = _b.locale;
|
|
74
|
+
var minimizedLocale = new Intl.Locale(locale)
|
|
75
|
+
.minimize()
|
|
76
|
+
.toString();
|
|
77
|
+
RelativeTimeFormat.localeData[locale] = RelativeTimeFormat.localeData[minimizedLocale] = d;
|
|
78
|
+
RelativeTimeFormat.availableLocales.add(minimizedLocale);
|
|
79
|
+
RelativeTimeFormat.availableLocales.add(locale);
|
|
80
|
+
if (!RelativeTimeFormat.__defaultLocale) {
|
|
81
|
+
RelativeTimeFormat.__defaultLocale = minimizedLocale;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
RelativeTimeFormat.getDefaultLocale = function () {
|
|
86
|
+
return RelativeTimeFormat.__defaultLocale;
|
|
87
|
+
};
|
|
88
|
+
RelativeTimeFormat.localeData = {};
|
|
89
|
+
RelativeTimeFormat.availableLocales = new Set();
|
|
90
|
+
RelativeTimeFormat.__defaultLocale = '';
|
|
91
|
+
RelativeTimeFormat.relevantExtensionKeys = ['nu'];
|
|
92
|
+
RelativeTimeFormat.polyfilled = true;
|
|
93
|
+
return RelativeTimeFormat;
|
|
94
|
+
}());
|
|
95
|
+
exports.default = RelativeTimeFormat;
|
|
96
|
+
try {
|
|
97
|
+
// IE11 does not have Symbol
|
|
98
|
+
if (typeof Symbol !== 'undefined') {
|
|
99
|
+
Object.defineProperty(RelativeTimeFormat.prototype, Symbol.toStringTag, {
|
|
100
|
+
value: 'Intl.RelativeTimeFormat',
|
|
101
|
+
writable: false,
|
|
102
|
+
enumerable: false,
|
|
103
|
+
configurable: true,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/length.js
|
|
107
|
+
Object.defineProperty(RelativeTimeFormat.prototype.constructor, 'length', {
|
|
108
|
+
value: 0,
|
|
109
|
+
writable: false,
|
|
110
|
+
enumerable: false,
|
|
111
|
+
configurable: true,
|
|
112
|
+
});
|
|
113
|
+
// https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/length.js
|
|
114
|
+
Object.defineProperty(RelativeTimeFormat.supportedLocalesOf, 'length', {
|
|
115
|
+
value: 1,
|
|
116
|
+
writable: false,
|
|
117
|
+
enumerable: false,
|
|
118
|
+
configurable: true,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
catch (e) {
|
|
122
|
+
// Meta fix so we're test262-compliant, not important
|
|
123
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function FormatRelativeTime(rtf: Intl.RelativeTimeFormat, value: number, unit: Intl.RelativeTimeFormatUnit, implDetails: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
}): string;
|
|
5
|
+
//# sourceMappingURL=FormatRelativeTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatRelativeTime.d.ts","sourceRoot":"","sources":["../../../../../../../packages/intl-relativetimeformat/abstract/FormatRelativeTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0BAA0B,EAAC,MAAM,4BAA4B,CAAA;AAGrE,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,WAAW,EAAE;IACX,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;CAC3E,GACA,MAAM,CAOR"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PartitionRelativeTimePattern } from './PartitionRelativeTimePattern';
|
|
2
|
+
export function FormatRelativeTime(rtf, value, unit, implDetails) {
|
|
3
|
+
var parts = PartitionRelativeTimePattern(rtf, value, unit, implDetails);
|
|
4
|
+
var result = '';
|
|
5
|
+
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
|
6
|
+
var part = parts_1[_i];
|
|
7
|
+
result += part.value;
|
|
8
|
+
}
|
|
9
|
+
return result;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function FormatRelativeTimeToParts(rtf: Intl.RelativeTimeFormat, value: number, unit: Intl.RelativeTimeFormatUnit, implDetails: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
}): Intl.RelativeTimeFormatPart[];
|
|
5
|
+
//# sourceMappingURL=FormatRelativeTimeToParts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatRelativeTimeToParts.d.ts","sourceRoot":"","sources":["../../../../../../../packages/intl-relativetimeformat/abstract/FormatRelativeTimeToParts.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,0BAA0B,EAC3B,MAAM,4BAA4B,CAAA;AAGnC,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,WAAW,EAAE;IACX,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;CAC3E,GACA,IAAI,CAAC,sBAAsB,EAAE,CAe/B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ArrayCreate, } from '@formatjs/ecma402-abstract';
|
|
2
|
+
import { PartitionRelativeTimePattern } from './PartitionRelativeTimePattern';
|
|
3
|
+
export function FormatRelativeTimeToParts(rtf, value, unit, implDetails) {
|
|
4
|
+
var parts = PartitionRelativeTimePattern(rtf, value, unit, implDetails);
|
|
5
|
+
var result = ArrayCreate(0);
|
|
6
|
+
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
|
7
|
+
var part = parts_1[_i];
|
|
8
|
+
var o = {
|
|
9
|
+
type: part.type,
|
|
10
|
+
value: part.value,
|
|
11
|
+
};
|
|
12
|
+
if ('unit' in part) {
|
|
13
|
+
o.unit = part.unit;
|
|
14
|
+
}
|
|
15
|
+
result.push(o);
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal, LocaleFieldsData } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function InitializeRelativeTimeFormat(rtf: Intl.RelativeTimeFormat, locales: string | string[] | undefined, options: Intl.RelativeTimeFormatOptions | undefined, { getInternalSlots, availableLocales, relevantExtensionKeys, localeData, getDefaultLocale, }: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
availableLocales: Set<string>;
|
|
5
|
+
relevantExtensionKeys: string[];
|
|
6
|
+
localeData: Record<string, LocaleFieldsData | undefined>;
|
|
7
|
+
getDefaultLocale(): string;
|
|
8
|
+
}): Intl.RelativeTimeFormat;
|
|
9
|
+
//# sourceMappingURL=InitializeRelativeTimeFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitializeRelativeTimeFormat.d.ts","sourceRoot":"","sources":["../../../../../../../packages/intl-relativetimeformat/abstract/InitializeRelativeTimeFormat.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAKjB,MAAM,4BAA4B,CAAA;AAKnC,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EACtC,OAAO,EAAE,IAAI,CAAC,yBAAyB,GAAG,SAAS,EACnD,EACE,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,gBAAgB,GACjB,EAAE;IACD,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;IAC1E,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,qBAAqB,EAAE,MAAM,EAAE,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC,CAAA;IACxD,gBAAgB,IAAI,MAAM,CAAA;CAC3B,2BA4DF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CanonicalizeLocaleList, CoerceOptionsToObject, GetOption, invariant, } from '@formatjs/ecma402-abstract';
|
|
2
|
+
import { ResolveLocale } from '@formatjs/intl-localematcher';
|
|
3
|
+
var NUMBERING_SYSTEM_REGEX = /^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i;
|
|
4
|
+
export function InitializeRelativeTimeFormat(rtf, locales, options, _a) {
|
|
5
|
+
var getInternalSlots = _a.getInternalSlots, availableLocales = _a.availableLocales, relevantExtensionKeys = _a.relevantExtensionKeys, localeData = _a.localeData, getDefaultLocale = _a.getDefaultLocale;
|
|
6
|
+
var internalSlots = getInternalSlots(rtf);
|
|
7
|
+
internalSlots.initializedRelativeTimeFormat = true;
|
|
8
|
+
var requestedLocales = CanonicalizeLocaleList(locales);
|
|
9
|
+
var opt = Object.create(null);
|
|
10
|
+
var opts = CoerceOptionsToObject(options);
|
|
11
|
+
var matcher = GetOption(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit');
|
|
12
|
+
opt.localeMatcher = matcher;
|
|
13
|
+
var numberingSystem = GetOption(opts,
|
|
14
|
+
// @ts-expect-error TS option is wack
|
|
15
|
+
'numberingSystem', 'string', undefined, undefined);
|
|
16
|
+
if (numberingSystem !== undefined) {
|
|
17
|
+
if (!NUMBERING_SYSTEM_REGEX.test(numberingSystem)) {
|
|
18
|
+
throw new RangeError("Invalid numbering system " + numberingSystem);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
opt.nu = numberingSystem;
|
|
22
|
+
var r = ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);
|
|
23
|
+
var locale = r.locale, nu = r.nu;
|
|
24
|
+
internalSlots.locale = locale;
|
|
25
|
+
internalSlots.style = GetOption(opts, 'style', 'string', ['long', 'narrow', 'short'], 'long');
|
|
26
|
+
internalSlots.numeric = GetOption(opts, 'numeric', 'string', ['always', 'auto'], 'always');
|
|
27
|
+
var fields = localeData[r.dataLocale];
|
|
28
|
+
invariant(!!fields, "Missing locale data for " + r.dataLocale);
|
|
29
|
+
internalSlots.fields = fields;
|
|
30
|
+
internalSlots.numberFormat = new Intl.NumberFormat(locales);
|
|
31
|
+
internalSlots.pluralRules = new Intl.PluralRules(locales);
|
|
32
|
+
internalSlots.numberingSystem = nu;
|
|
33
|
+
return rtf;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MakePartsList.d.ts","sourceRoot":"","sources":["../../../../../../../packages/intl-relativetimeformat/abstract/MakePartsList.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,sBAAsB,EAAE,iCAsB/D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { invariant, PartitionPattern } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export function MakePartsList(pattern, unit, parts) {
|
|
3
|
+
var patternParts = PartitionPattern(pattern);
|
|
4
|
+
var result = [];
|
|
5
|
+
for (var _i = 0, patternParts_1 = patternParts; _i < patternParts_1.length; _i++) {
|
|
6
|
+
var patternPart = patternParts_1[_i];
|
|
7
|
+
if (patternPart.type === 'literal') {
|
|
8
|
+
result.push({
|
|
9
|
+
type: 'literal',
|
|
10
|
+
value: patternPart.value,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
invariant(patternPart.type === '0', "Malformed pattern " + pattern);
|
|
15
|
+
for (var _a = 0, parts_1 = parts; _a < parts_1.length; _a++) {
|
|
16
|
+
var part = parts_1[_a];
|
|
17
|
+
result.push({
|
|
18
|
+
type: part.type,
|
|
19
|
+
value: part.value,
|
|
20
|
+
unit: unit,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RelativeTimeFormatInternal } from '@formatjs/ecma402-abstract';
|
|
2
|
+
export declare function PartitionRelativeTimePattern(rtf: Intl.RelativeTimeFormat, value: number, unit: Intl.RelativeTimeFormatUnit, { getInternalSlots, }: {
|
|
3
|
+
getInternalSlots(rtf: Intl.RelativeTimeFormat): RelativeTimeFormatInternal;
|
|
4
|
+
}): Intl.RelativeTimeFormatPart[];
|
|
5
|
+
//# sourceMappingURL=PartitionRelativeTimePattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartitionRelativeTimePattern.d.ts","sourceRoot":"","sources":["../../../../../../../packages/intl-relativetimeformat/abstract/PartitionRelativeTimePattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,0BAA0B,EAI3B,MAAM,4BAA4B,CAAA;AAInC,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,EACE,gBAAgB,GACjB,EAAE;IACD,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAA;CAC3E,GACA,IAAI,CAAC,sBAAsB,EAAE,CA0D/B"}
|