javascript-time-ago 2.5.11 → 2.5.12
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/bundle/javascript-time-ago.js +1 -1
- package/bundle/javascript-time-ago.js.map +1 -1
- package/bundle/javascript-time-ago.min.js +1 -1
- package/bundle/javascript-time-ago.min.js.map +1 -1
- package/commonjs/LocaleDataStore.js +2 -5
- package/commonjs/LocaleDataStore.js.map +1 -1
- package/commonjs/PropTypes.js +12 -12
- package/commonjs/PropTypes.js.map +1 -1
- package/commonjs/TimeAgo.js +135 -190
- package/commonjs/TimeAgo.js.map +1 -1
- package/commonjs/TimeAgo.test.js +124 -130
- package/commonjs/TimeAgo.test.js.map +1 -1
- package/commonjs/cache.js +7 -25
- package/commonjs/cache.js.map +1 -1
- package/commonjs/cache.test.js +1 -3
- package/commonjs/cache.test.js.map +1 -1
- package/commonjs/isStyleObject.js +9 -9
- package/commonjs/isStyleObject.js.map +1 -1
- package/commonjs/isStyleObject.test.js +1 -3
- package/commonjs/isStyleObject.test.js.map +1 -1
- package/commonjs/locale.js +6 -19
- package/commonjs/locale.js.map +1 -1
- package/commonjs/locale.test.js +2 -11
- package/commonjs/locale.test.js.map +1 -1
- package/commonjs/round.js +2 -5
- package/commonjs/round.js.map +1 -1
- package/commonjs/steps/approximate.js +1 -4
- package/commonjs/steps/approximate.js.map +1 -1
- package/commonjs/steps/approximate.test.js +1 -6
- package/commonjs/steps/approximate.test.js.map +1 -1
- package/commonjs/steps/getStep.js +36 -53
- package/commonjs/steps/getStep.js.map +1 -1
- package/commonjs/steps/getStep.test.js +7 -7
- package/commonjs/steps/getStep.test.js.map +1 -1
- package/commonjs/steps/getStepDenominator.js +2 -5
- package/commonjs/steps/getStepDenominator.js.map +1 -1
- package/commonjs/steps/getStepDenominator.test.js +1 -3
- package/commonjs/steps/getStepDenominator.test.js.map +1 -1
- package/commonjs/steps/getStepMinTime.js +17 -32
- package/commonjs/steps/getStepMinTime.js.map +1 -1
- package/commonjs/steps/getStepMinTime.test.js +1 -3
- package/commonjs/steps/getStepMinTime.test.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdate.js +19 -41
- package/commonjs/steps/getTimeToNextUpdate.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdate.test.js +29 -25
- package/commonjs/steps/getTimeToNextUpdate.test.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdateForUnit.js +3 -12
- package/commonjs/steps/getTimeToNextUpdateForUnit.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdateForUnit.test.js +1 -7
- package/commonjs/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
- package/commonjs/steps/helpers.js +1 -2
- package/commonjs/steps/helpers.js.map +1 -1
- package/commonjs/steps/helpers.test.js +0 -1
- package/commonjs/steps/helpers.test.js.map +1 -1
- package/commonjs/steps/index.js +1 -6
- package/commonjs/steps/index.js.map +1 -1
- package/commonjs/steps/renameLegacyProperties.js +6 -14
- package/commonjs/steps/renameLegacyProperties.js.map +1 -1
- package/commonjs/steps/renameLegacyProperties.test.js +1 -3
- package/commonjs/steps/renameLegacyProperties.test.js.map +1 -1
- package/commonjs/steps/round.js +1 -2
- package/commonjs/steps/round.js.map +1 -1
- package/commonjs/steps/round.test.js +1 -7
- package/commonjs/steps/round.test.js.map +1 -1
- package/commonjs/steps/units.js +10 -21
- package/commonjs/steps/units.js.map +1 -1
- package/commonjs/style/approximate.js +2 -6
- package/commonjs/style/approximate.js.map +1 -1
- package/commonjs/style/approximateTime.js +2 -6
- package/commonjs/style/approximateTime.js.map +1 -1
- package/commonjs/style/approximateTime.test.js +116 -75
- package/commonjs/style/approximateTime.test.js.map +1 -1
- package/commonjs/style/getStyleByName.js +3 -29
- package/commonjs/style/getStyleByName.js.map +1 -1
- package/commonjs/style/mini.js +9 -6
- package/commonjs/style/mini.js.map +1 -1
- package/commonjs/style/mini.test.js +15 -25
- package/commonjs/style/mini.test.js.map +1 -1
- package/commonjs/style/miniMinute.js +8 -13
- package/commonjs/style/miniMinute.js.map +1 -1
- package/commonjs/style/miniMinute.test.js +11 -17
- package/commonjs/style/miniMinute.test.js.map +1 -1
- package/commonjs/style/miniMinuteNow.js +8 -13
- package/commonjs/style/miniMinuteNow.js.map +1 -1
- package/commonjs/style/miniMinuteNow.test.js +11 -17
- package/commonjs/style/miniMinuteNow.test.js.map +1 -1
- package/commonjs/style/miniNow.js +8 -13
- package/commonjs/style/miniNow.js.map +1 -1
- package/commonjs/style/miniNow.test.js +11 -17
- package/commonjs/style/miniNow.test.js.map +1 -1
- package/commonjs/style/renameLegacyProperties.js +7 -13
- package/commonjs/style/renameLegacyProperties.js.map +1 -1
- package/commonjs/style/renameLegacyProperties.test.js +1 -4
- package/commonjs/style/renameLegacyProperties.test.js.map +1 -1
- package/commonjs/style/round.js +2 -6
- package/commonjs/style/round.js.map +1 -1
- package/commonjs/style/round.test.js +51 -67
- package/commonjs/style/round.test.js.map +1 -1
- package/commonjs/style/roundMinute.js +8 -13
- package/commonjs/style/roundMinute.js.map +1 -1
- package/commonjs/style/roundMinute.test.js +20 -27
- package/commonjs/style/roundMinute.test.js.map +1 -1
- package/commonjs/style/twitter.js +34 -38
- package/commonjs/style/twitter.js.map +1 -1
- package/commonjs/style/twitter.test.js +49 -55
- package/commonjs/style/twitter.test.js.map +1 -1
- package/commonjs/style/twitterFirstMinute.js +10 -15
- package/commonjs/style/twitterFirstMinute.js.map +1 -1
- package/commonjs/style/twitterFirstMinute.test.js +16 -23
- package/commonjs/style/twitterFirstMinute.test.js.map +1 -1
- package/commonjs/style/twitterMinute.js +8 -13
- package/commonjs/style/twitterMinute.js.map +1 -1
- package/commonjs/style/twitterMinute.test.js +20 -25
- package/commonjs/style/twitterMinute.test.js.map +1 -1
- package/commonjs/style/twitterMinuteNow.js +8 -13
- package/commonjs/style/twitterMinuteNow.js.map +1 -1
- package/commonjs/style/twitterMinuteNow.test.js +20 -25
- package/commonjs/style/twitterMinuteNow.test.js.map +1 -1
- package/commonjs/style/twitterNow.js +8 -13
- package/commonjs/style/twitterNow.js.map +1 -1
- package/commonjs/style/twitterNow.test.js +18 -24
- package/commonjs/style/twitterNow.test.js.map +1 -1
- package/load-all-locales/index.cjs +32 -0
- package/load-all-locales/index.cjs.js +32 -0
- package/load-all-locales/index.js +64 -0
- package/locale/ak/package.json +16 -0
- package/locale/ak.json +267 -0
- package/locale/ak.json.d.ts +4 -0
- package/locale/ak.json.js +267 -0
- package/locale/bal-Latn/package.json +16 -0
- package/locale/bal-Latn.json +240 -0
- package/locale/bal-Latn.json.d.ts +4 -0
- package/locale/bal-Latn.json.js +240 -0
- package/locale/be-tarask/package.json +16 -0
- package/locale/be-tarask.json +259 -0
- package/locale/be-tarask.json.d.ts +4 -0
- package/locale/be-tarask.json.js +259 -0
- package/locale/blo/package.json +16 -0
- package/locale/blo.json +159 -0
- package/locale/blo.json.d.ts +4 -0
- package/locale/blo.json.js +159 -0
- package/locale/bn.json +5 -2
- package/locale/bn.json.js +5 -2
- package/locale/bs.json +8 -2
- package/locale/bs.json.js +8 -2
- package/locale/ccp.json +2 -8
- package/locale/ccp.json.js +2 -8
- package/locale/csw/package.json +16 -0
- package/locale/csw.json +180 -0
- package/locale/csw.json.d.ts +4 -0
- package/locale/csw.json.js +180 -0
- package/locale/cy.json +6 -12
- package/locale/cy.json.js +6 -12
- package/locale/doi/package.json +16 -0
- package/locale/doi.json +159 -0
- package/locale/doi.json.d.ts +4 -0
- package/locale/doi.json.js +159 -0
- package/locale/en-AU.json +12 -12
- package/locale/en-AU.json.js +12 -12
- package/locale/en-CZ/package.json +16 -0
- package/locale/en-CZ.json +219 -0
- package/locale/en-CZ.json.d.ts +4 -0
- package/locale/en-CZ.json.js +219 -0
- package/locale/en-ES/package.json +16 -0
- package/locale/en-ES.json +219 -0
- package/locale/en-ES.json.d.ts +4 -0
- package/locale/en-ES.json.js +219 -0
- package/locale/en-FR/package.json +16 -0
- package/locale/en-FR.json +219 -0
- package/locale/en-FR.json.d.ts +4 -0
- package/locale/en-FR.json.js +219 -0
- package/locale/en-GS/package.json +16 -0
- package/locale/en-GS.json +219 -0
- package/locale/en-GS.json.d.ts +4 -0
- package/locale/en-GS.json.js +219 -0
- package/locale/en-HU/package.json +16 -0
- package/locale/en-HU.json +219 -0
- package/locale/en-HU.json.d.ts +4 -0
- package/locale/en-HU.json.js +219 -0
- package/locale/en-ID/package.json +16 -0
- package/locale/en-ID.json +219 -0
- package/locale/en-ID.json.d.ts +4 -0
- package/locale/en-ID.json.js +219 -0
- package/locale/en-IT/package.json +16 -0
- package/locale/en-IT.json +219 -0
- package/locale/en-IT.json.d.ts +4 -0
- package/locale/en-IT.json.js +219 -0
- package/locale/en-NO/package.json +16 -0
- package/locale/en-NO.json +219 -0
- package/locale/en-NO.json.d.ts +4 -0
- package/locale/en-NO.json.js +219 -0
- package/locale/en-PL/package.json +16 -0
- package/locale/en-PL.json +219 -0
- package/locale/en-PL.json.d.ts +4 -0
- package/locale/en-PL.json.js +219 -0
- package/locale/en-PT/package.json +16 -0
- package/locale/en-PT.json +219 -0
- package/locale/en-PT.json.d.ts +4 -0
- package/locale/en-PT.json.js +219 -0
- package/locale/en-RO/package.json +16 -0
- package/locale/en-RO.json +219 -0
- package/locale/en-RO.json.d.ts +4 -0
- package/locale/en-RO.json.js +219 -0
- package/locale/en-SK/package.json +16 -0
- package/locale/en-SK.json +219 -0
- package/locale/en-SK.json.d.ts +4 -0
- package/locale/en-SK.json.js +219 -0
- package/locale/es-MX.json +12 -9
- package/locale/es-MX.json.js +12 -9
- package/locale/es-SV.json +2 -2
- package/locale/es-SV.json.js +2 -2
- package/locale/eu.json +24 -24
- package/locale/eu.json.js +24 -24
- package/locale/ha.json +119 -65
- package/locale/ha.json.js +119 -65
- package/locale/he.json +0 -6
- package/locale/he.json.js +0 -6
- package/locale/hi-Latn.json +2 -2
- package/locale/hi-Latn.json.js +2 -2
- package/locale/ht/package.json +16 -0
- package/locale/ht.json +207 -0
- package/locale/ht.json.d.ts +4 -0
- package/locale/ht.json.js +207 -0
- package/locale/id.json +1 -1
- package/locale/id.json.js +1 -1
- package/locale/ie/package.json +16 -0
- package/locale/ie.json +159 -0
- package/locale/ie.json.d.ts +4 -0
- package/locale/ie.json.js +159 -0
- package/locale/ig.json +17 -17
- package/locale/ig.json.js +17 -17
- package/locale/ii/package.json +16 -0
- package/locale/ii.json +165 -0
- package/locale/ii.json.d.ts +4 -0
- package/locale/ii.json.js +165 -0
- package/locale/is.json +4 -1
- package/locale/is.json.js +4 -1
- package/locale/kaa/package.json +16 -0
- package/locale/kaa.json +159 -0
- package/locale/kaa.json.d.ts +4 -0
- package/locale/kaa.json.js +159 -0
- package/locale/kok-Latn/package.json +16 -0
- package/locale/kok-Latn.json +159 -0
- package/locale/kok-Latn.json.d.ts +4 -0
- package/locale/kok-Latn.json.js +159 -0
- package/locale/kok.json +8 -8
- package/locale/kok.json.js +8 -8
- package/locale/ks.json +9 -9
- package/locale/ks.json.js +9 -9
- package/locale/ku.json +55 -46
- package/locale/ku.json.js +55 -46
- package/locale/lld/package.json +16 -0
- package/locale/lld.json +291 -0
- package/locale/lld.json.d.ts +4 -0
- package/locale/lld.json.js +291 -0
- package/locale/mi.json +22 -22
- package/locale/mi.json.js +22 -22
- package/locale/ms-Arab/package.json +16 -0
- package/locale/ms-Arab.json +159 -0
- package/locale/ms-Arab.json.d.ts +4 -0
- package/locale/ms-Arab.json.js +159 -0
- package/locale/nb.json +2 -2
- package/locale/nb.json.js +2 -2
- package/locale/ne.json +1 -1
- package/locale/ne.json.js +1 -1
- package/locale/nn.json +4 -4
- package/locale/nn.json.js +4 -4
- package/locale/no.json +2 -2
- package/locale/no.json.js +2 -2
- package/locale/nqo/package.json +16 -0
- package/locale/nqo.json +159 -0
- package/locale/nqo.json.d.ts +4 -0
- package/locale/nqo.json.js +159 -0
- package/locale/om/package.json +16 -0
- package/locale/om.json +213 -0
- package/locale/om.json.d.ts +4 -0
- package/locale/om.json.js +213 -0
- package/locale/or.json +1 -1
- package/locale/or.json.js +1 -1
- package/locale/qu.json +46 -46
- package/locale/qu.json.js +46 -46
- package/locale/rhg/package.json +16 -0
- package/locale/rhg.json +159 -0
- package/locale/rhg.json.d.ts +4 -0
- package/locale/rhg.json.js +159 -0
- package/locale/sl.json +12 -12
- package/locale/sl.json.js +12 -12
- package/locale/sr-Cyrl-BA.json +2 -2
- package/locale/sr-Cyrl-BA.json.js +2 -2
- package/locale/sr-Latn-BA.json +2 -2
- package/locale/sr-Latn-BA.json.js +2 -2
- package/locale/sv.json +1 -1
- package/locale/sv.json.js +1 -1
- package/locale/syr/package.json +16 -0
- package/locale/syr.json +303 -0
- package/locale/syr.json.d.ts +4 -0
- package/locale/syr.json.js +303 -0
- package/locale/ti.json +6 -6
- package/locale/ti.json.js +6 -6
- package/locale/tn/package.json +16 -0
- package/locale/tn.json +159 -0
- package/locale/tn.json.d.ts +4 -0
- package/locale/tn.json.js +159 -0
- package/locale/to.json +26 -26
- package/locale/to.json.js +26 -26
- package/locale/uk.json +1 -1
- package/locale/uk.json.js +1 -1
- package/locale/ur-IN.json +9 -6
- package/locale/ur-IN.json.js +9 -6
- package/locale/vec/package.json +16 -0
- package/locale/vec.json +267 -0
- package/locale/vec.json.d.ts +4 -0
- package/locale/vec.json.js +267 -0
- package/locale/xnr/package.json +16 -0
- package/locale/xnr.json +159 -0
- package/locale/xnr.json.d.ts +4 -0
- package/locale/xnr.json.js +159 -0
- package/locale/yo-BJ.json +17 -17
- package/locale/yo-BJ.json.js +17 -17
- package/locale/yo.json +17 -17
- package/locale/yo.json.js +17 -17
- package/modules/LocaleDataStore.js +2 -3
- package/modules/LocaleDataStore.js.map +1 -1
- package/modules/PropTypes.js +11 -7
- package/modules/PropTypes.js.map +1 -1
- package/modules/TimeAgo.js +135 -174
- package/modules/TimeAgo.js.map +1 -1
- package/modules/TimeAgo.test.js +126 -115
- package/modules/TimeAgo.test.js.map +1 -1
- package/modules/cache.js +6 -22
- package/modules/cache.js.map +1 -1
- package/modules/cache.test.js.map +1 -1
- package/modules/isStyleObject.js +9 -7
- package/modules/isStyleObject.js.map +1 -1
- package/modules/isStyleObject.test.js.map +1 -1
- package/modules/locale.js +6 -16
- package/modules/locale.js.map +1 -1
- package/modules/locale.test.js +0 -4
- package/modules/locale.test.js.map +1 -1
- package/modules/round.js +2 -3
- package/modules/round.js.map +1 -1
- package/modules/steps/approximate.js +6 -2
- package/modules/steps/approximate.js.map +1 -1
- package/modules/steps/approximate.test.js +0 -2
- package/modules/steps/approximate.test.js.map +1 -1
- package/modules/steps/getStep.js +36 -48
- package/modules/steps/getStep.js.map +1 -1
- package/modules/steps/getStep.test.js +6 -2
- package/modules/steps/getStep.test.js.map +1 -1
- package/modules/steps/getStepDenominator.js +2 -3
- package/modules/steps/getStepDenominator.js.map +1 -1
- package/modules/steps/getStepDenominator.test.js.map +1 -1
- package/modules/steps/getStepMinTime.js +17 -29
- package/modules/steps/getStepMinTime.js.map +1 -1
- package/modules/steps/getStepMinTime.test.js.map +1 -1
- package/modules/steps/getTimeToNextUpdate.js +19 -31
- package/modules/steps/getTimeToNextUpdate.js.map +1 -1
- package/modules/steps/getTimeToNextUpdate.test.js +27 -18
- package/modules/steps/getTimeToNextUpdate.test.js.map +1 -1
- package/modules/steps/getTimeToNextUpdateForUnit.js +4 -10
- package/modules/steps/getTimeToNextUpdateForUnit.js.map +1 -1
- package/modules/steps/getTimeToNextUpdateForUnit.test.js +0 -4
- package/modules/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
- package/modules/steps/helpers.js +1 -1
- package/modules/steps/helpers.js.map +1 -1
- package/modules/steps/helpers.test.js.map +1 -1
- package/modules/steps/index.js +2 -1
- package/modules/steps/index.js.map +1 -1
- package/modules/steps/renameLegacyProperties.js +6 -13
- package/modules/steps/renameLegacyProperties.js.map +1 -1
- package/modules/steps/renameLegacyProperties.test.js.map +1 -1
- package/modules/steps/round.js.map +1 -1
- package/modules/steps/round.test.js +0 -3
- package/modules/steps/round.test.js.map +1 -1
- package/modules/steps/units.js +5 -9
- package/modules/steps/units.js.map +1 -1
- package/modules/style/approximate.js +5 -1
- package/modules/style/approximate.js.map +1 -1
- package/modules/style/approximateTime.js +6 -2
- package/modules/style/approximateTime.js.map +1 -1
- package/modules/style/approximateTime.test.js +115 -70
- package/modules/style/approximateTime.test.js.map +1 -1
- package/modules/style/getStyleByName.js +4 -17
- package/modules/style/getStyleByName.js.map +1 -1
- package/modules/style/mini.js +8 -4
- package/modules/style/mini.js.map +1 -1
- package/modules/style/mini.test.js +14 -20
- package/modules/style/mini.test.js.map +1 -1
- package/modules/style/miniMinute.js +6 -6
- package/modules/style/miniMinute.js.map +1 -1
- package/modules/style/miniMinute.test.js +10 -12
- package/modules/style/miniMinute.test.js.map +1 -1
- package/modules/style/miniMinuteNow.js +6 -6
- package/modules/style/miniMinuteNow.js.map +1 -1
- package/modules/style/miniMinuteNow.test.js +10 -12
- package/modules/style/miniMinuteNow.test.js.map +1 -1
- package/modules/style/miniNow.js +6 -6
- package/modules/style/miniNow.js.map +1 -1
- package/modules/style/miniNow.test.js +10 -12
- package/modules/style/miniNow.test.js.map +1 -1
- package/modules/style/renameLegacyProperties.js +8 -10
- package/modules/style/renameLegacyProperties.js.map +1 -1
- package/modules/style/renameLegacyProperties.test.js +0 -1
- package/modules/style/renameLegacyProperties.test.js.map +1 -1
- package/modules/style/round.js +3 -2
- package/modules/style/round.js.map +1 -1
- package/modules/style/round.test.js +50 -62
- package/modules/style/round.test.js.map +1 -1
- package/modules/style/roundMinute.js +8 -7
- package/modules/style/roundMinute.js.map +1 -1
- package/modules/style/roundMinute.test.js +19 -22
- package/modules/style/roundMinute.test.js.map +1 -1
- package/modules/style/twitter.js +35 -32
- package/modules/style/twitter.js.map +1 -1
- package/modules/style/twitter.test.js +48 -50
- package/modules/style/twitter.test.js.map +1 -1
- package/modules/style/twitterFirstMinute.js +8 -7
- package/modules/style/twitterFirstMinute.js.map +1 -1
- package/modules/style/twitterFirstMinute.test.js +15 -18
- package/modules/style/twitterFirstMinute.test.js.map +1 -1
- package/modules/style/twitterMinute.js +6 -6
- package/modules/style/twitterMinute.js.map +1 -1
- package/modules/style/twitterMinute.test.js +19 -20
- package/modules/style/twitterMinute.test.js.map +1 -1
- package/modules/style/twitterMinuteNow.js +6 -6
- package/modules/style/twitterMinuteNow.js.map +1 -1
- package/modules/style/twitterMinuteNow.test.js +19 -20
- package/modules/style/twitterMinuteNow.test.js.map +1 -1
- package/modules/style/twitterNow.js +6 -6
- package/modules/style/twitterNow.js.map +1 -1
- package/modules/style/twitterNow.test.js +17 -19
- package/modules/style/twitterNow.test.js.map +1 -1
- package/package.json +261 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import roundMinute from './roundMinute.js';
|
|
8
8
|
import TimeAgo from '../TimeAgo.js';
|
|
9
9
|
import { day, month, year } from '../steps/index.js';
|
|
@@ -11,7 +11,6 @@ describe('style/round-minute', function () {
|
|
|
11
11
|
it('should format relative time (English) (round: "floor")', function () {
|
|
12
12
|
var timeAgo = new TimeAgo('en');
|
|
13
13
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
14
|
-
|
|
15
14
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
16
15
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
17
16
|
now: now
|
|
@@ -19,7 +18,6 @@ describe('style/round-minute', function () {
|
|
|
19
18
|
round: 'floor'
|
|
20
19
|
}));
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
formatInterval(0).should.equal('just now');
|
|
24
22
|
formatInterval(0.9).should.equal('just now');
|
|
25
23
|
formatInterval(1).should.equal('just now');
|
|
@@ -28,52 +26,51 @@ describe('style/round-minute', function () {
|
|
|
28
26
|
formatInterval(1.9 * 60).should.equal('1 minute ago');
|
|
29
27
|
formatInterval(2 * 60).should.equal('2 minutes ago');
|
|
30
28
|
formatInterval(2.9 * 60).should.equal('2 minutes ago');
|
|
31
|
-
formatInterval(3 * 60).should.equal('3 minutes ago');
|
|
32
|
-
|
|
29
|
+
formatInterval(3 * 60).should.equal('3 minutes ago');
|
|
30
|
+
// …
|
|
33
31
|
formatInterval(59.9 * 60).should.equal('59 minutes ago');
|
|
34
32
|
formatInterval(60 * 60).should.equal('1 hour ago');
|
|
35
33
|
formatInterval(1.9 * 60 * 60).should.equal('1 hour ago');
|
|
36
34
|
formatInterval(2 * 60 * 60).should.equal('2 hours ago');
|
|
37
35
|
formatInterval(2.9 * 60 * 60).should.equal('2 hours ago');
|
|
38
|
-
formatInterval(3 * 60 * 60).should.equal('3 hours ago');
|
|
39
|
-
|
|
36
|
+
formatInterval(3 * 60 * 60).should.equal('3 hours ago');
|
|
37
|
+
// …
|
|
40
38
|
formatInterval(23.9 * 60 * 60).should.equal('23 hours ago');
|
|
41
39
|
formatInterval(24 * 60 * 60).should.equal('1 day ago');
|
|
42
40
|
formatInterval(1.9 * day).should.equal('1 day ago');
|
|
43
41
|
formatInterval(2 * day).should.equal('2 days ago');
|
|
44
42
|
formatInterval(2.9 * day).should.equal('2 days ago');
|
|
45
|
-
formatInterval(3 * day).should.equal('3 days ago');
|
|
46
|
-
|
|
43
|
+
formatInterval(3 * day).should.equal('3 days ago');
|
|
44
|
+
// …
|
|
47
45
|
formatInterval(6.9 * day).should.equal('6 days ago');
|
|
48
|
-
formatInterval(7 * day).should.equal('1 week ago');
|
|
49
|
-
|
|
46
|
+
formatInterval(7 * day).should.equal('1 week ago');
|
|
47
|
+
// …
|
|
50
48
|
formatInterval(3.9 * 7 * day).should.equal('3 weeks ago');
|
|
51
49
|
formatInterval(4 * 7 * day).should.equal('4 weeks ago');
|
|
52
50
|
formatInterval(30.51 * day).should.equal('1 month ago');
|
|
53
51
|
formatInterval(1.9 * month).should.equal('1 month ago');
|
|
54
52
|
formatInterval(2 * month).should.equal('2 months ago');
|
|
55
53
|
formatInterval(2.9 * month).should.equal('2 months ago');
|
|
56
|
-
formatInterval(3 * month).should.equal('3 months ago');
|
|
57
|
-
|
|
54
|
+
formatInterval(3 * month).should.equal('3 months ago');
|
|
55
|
+
// …
|
|
58
56
|
formatInterval(11.9 * month).should.equal('11 months ago');
|
|
59
57
|
formatInterval(12 * month).should.equal('1 year ago');
|
|
60
58
|
formatInterval(1.99 * year).should.equal('1 year ago');
|
|
61
|
-
formatInterval(2 * year).should.equal('2 years ago');
|
|
62
|
-
//
|
|
59
|
+
formatInterval(2 * year).should.equal('2 years ago');
|
|
60
|
+
// …
|
|
63
61
|
|
|
62
|
+
// Test future dates.
|
|
64
63
|
formatInterval(-1 * 3 * 60).should.equal('in 3 minutes');
|
|
65
64
|
formatInterval(-1 * month * 8).should.equal('in 8 months');
|
|
66
65
|
});
|
|
67
66
|
it('should format relative time (English)', function () {
|
|
68
67
|
var timeAgo = new TimeAgo('en');
|
|
69
68
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
70
|
-
|
|
71
69
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
72
70
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread({
|
|
73
71
|
now: now
|
|
74
72
|
}, roundMinute));
|
|
75
73
|
};
|
|
76
|
-
|
|
77
74
|
formatInterval(0).should.equal('just now');
|
|
78
75
|
formatInterval(0.49).should.equal('just now');
|
|
79
76
|
formatInterval(0.5).should.equal('just now');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roundMinute.test.js","names":["roundMinute","TimeAgo","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","round","should","equal"],"sources":["../../source/style/roundMinute.test.js"],"sourcesContent":["import roundMinute from './roundMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/round-minute', () => {\r\n\tit('should format relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...roundMinute, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('just now')\r\n\t\tformatInterval(0.9).should.equal('just now')\r\n\t\tformatInterval(1).should.equal('just now')\r\n\t\tformatInterval(59.9).should.equal('just now')\r\n\t\tformatInterval(60).should.equal('1 minute ago')\r\n\t\tformatInterval(1.9 * 60).should.equal('1 minute ago')\r\n\t\tformatInterval(2 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(2.9 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(3 * 60).should.equal('3 minutes ago')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * 60).should.equal('59 minutes ago')\r\n\t\tformatInterval(60 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(1.9 * 60 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(2 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(2.9 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(3 * 60 * 60).should.equal('3 hours ago')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * 60 * 60).should.equal('23 hours ago')\r\n\t\tformatInterval(24 * 60 * 60).should.equal('1 day ago')\r\n\t\tformatInterval(1.9 * day).should.equal('1 day ago')\r\n\t\tformatInterval(2 * day).should.equal('2 days ago')\r\n\t\tformatInterval(2.9 * day).should.equal('2 days ago')\r\n\t\tformatInterval(3 * day).should.equal('3 days ago')\r\n\t\t// …\r\n\t\tformatInterval(6.9 * day).should.equal('6 days ago')\r\n\t\tformatInterval(7 * day).should.equal('1 week ago')\r\n\t\t// …\r\n\t\tformatInterval(3.9 * 7 * day).should.equal('3 weeks ago')\r\n\t\tformatInterval(4 * 7 * day).should.equal('4 weeks ago')\r\n\t\tformatInterval(30.51 * day).should.equal('1 month ago')\r\n\t\tformatInterval(1.9 * month).should.equal('1 month ago')\r\n\t\tformatInterval(2 * month).should.equal('2 months ago')\r\n\t\tformatInterval(2.9 * month).should.equal('2 months ago')\r\n\t\tformatInterval(3 * month).should.equal('3 months ago')\r\n\t\t// …\r\n\t\tformatInterval(11.9 * month).should.equal('11 months ago')\r\n\t\tformatInterval(12 * month).should.equal('1 year ago')\r\n\t\tformatInterval(1.99 * year).should.equal('1 year ago')\r\n\t\tformatInterval(2 * year).should.equal('2 years ago')\r\n\t\t// …\r\n\r\n\t\t// Test future dates.\r\n\t\tformatInterval(-1 * 3 * 60).should.equal('in 3 minutes')\r\n\t\tformatInterval(-1 * month * 8).should.equal('in 8 months')\r\n\t})\r\n\r\n\tit('should format relative time (English)', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...roundMinute })\r\n\r\n\t\tformatInterval(0).should.equal('just now')\r\n\t\tformatInterval(0.49).should.equal('just now')\r\n\t\tformatInterval(0.5).should.equal('just now')\r\n\t\tformatInterval(29.9).should.equal('just now')\r\n\t\tformatInterval(30).should.equal('1 minute ago')\r\n\t\tformatInterval(1.49 * 60).should.equal('1 minute ago')\r\n\t\tformatInterval(1.5 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(2.49 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(2.5 * 60).should.equal('3 minutes ago')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"roundMinute.test.js","names":["roundMinute","TimeAgo","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","_objectSpread","round","should","equal"],"sources":["../../source/style/roundMinute.test.js"],"sourcesContent":["import roundMinute from './roundMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/round-minute', () => {\r\n\tit('should format relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...roundMinute, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('just now')\r\n\t\tformatInterval(0.9).should.equal('just now')\r\n\t\tformatInterval(1).should.equal('just now')\r\n\t\tformatInterval(59.9).should.equal('just now')\r\n\t\tformatInterval(60).should.equal('1 minute ago')\r\n\t\tformatInterval(1.9 * 60).should.equal('1 minute ago')\r\n\t\tformatInterval(2 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(2.9 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(3 * 60).should.equal('3 minutes ago')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * 60).should.equal('59 minutes ago')\r\n\t\tformatInterval(60 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(1.9 * 60 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(2 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(2.9 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(3 * 60 * 60).should.equal('3 hours ago')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * 60 * 60).should.equal('23 hours ago')\r\n\t\tformatInterval(24 * 60 * 60).should.equal('1 day ago')\r\n\t\tformatInterval(1.9 * day).should.equal('1 day ago')\r\n\t\tformatInterval(2 * day).should.equal('2 days ago')\r\n\t\tformatInterval(2.9 * day).should.equal('2 days ago')\r\n\t\tformatInterval(3 * day).should.equal('3 days ago')\r\n\t\t// …\r\n\t\tformatInterval(6.9 * day).should.equal('6 days ago')\r\n\t\tformatInterval(7 * day).should.equal('1 week ago')\r\n\t\t// …\r\n\t\tformatInterval(3.9 * 7 * day).should.equal('3 weeks ago')\r\n\t\tformatInterval(4 * 7 * day).should.equal('4 weeks ago')\r\n\t\tformatInterval(30.51 * day).should.equal('1 month ago')\r\n\t\tformatInterval(1.9 * month).should.equal('1 month ago')\r\n\t\tformatInterval(2 * month).should.equal('2 months ago')\r\n\t\tformatInterval(2.9 * month).should.equal('2 months ago')\r\n\t\tformatInterval(3 * month).should.equal('3 months ago')\r\n\t\t// …\r\n\t\tformatInterval(11.9 * month).should.equal('11 months ago')\r\n\t\tformatInterval(12 * month).should.equal('1 year ago')\r\n\t\tformatInterval(1.99 * year).should.equal('1 year ago')\r\n\t\tformatInterval(2 * year).should.equal('2 years ago')\r\n\t\t// …\r\n\r\n\t\t// Test future dates.\r\n\t\tformatInterval(-1 * 3 * 60).should.equal('in 3 minutes')\r\n\t\tformatInterval(-1 * month * 8).should.equal('in 8 months')\r\n\t})\r\n\r\n\tit('should format relative time (English)', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...roundMinute })\r\n\r\n\t\tformatInterval(0).should.equal('just now')\r\n\t\tformatInterval(0.49).should.equal('just now')\r\n\t\tformatInterval(0.5).should.equal('just now')\r\n\t\tformatInterval(29.9).should.equal('just now')\r\n\t\tformatInterval(30).should.equal('1 minute ago')\r\n\t\tformatInterval(1.49 * 60).should.equal('1 minute ago')\r\n\t\tformatInterval(1.5 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(2.49 * 60).should.equal('2 minutes ago')\r\n\t\tformatInterval(2.5 * 60).should.equal('3 minutes ago')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,WAAW,MAAM,kBAAkB;AAC1C,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAEpDC,QAAQ,CAAC,oBAAoB,EAAE,YAAM;EACpCC,EAAE,CAAC,wDAAwD,EAAE,YAAM;IAClE,IAAMC,OAAO,GAAG,IAAIN,OAAO,CAAC,IAAI,CAAC;IAEjC,IAAMO,GAAG,GAAG,IAAIC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAACC,OAAO,CAAC,CAAC;IACnD,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,aAAa;MAAA,OAAKL,OAAO,CAACM,MAAM,CAACL,GAAG,GAAGI,aAAa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,GAAG,IAAI,EAAAE,aAAA;QAAIN,GAAG,EAAHA;MAAG,GAAKR,WAAW,CAAE,CAAC;IAAA;IAE7GW,cAAc,CAAC,CAAC,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,UAAU,CAAC;IAC1CN,cAAc,CAAC,IAAI,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,UAAU,CAAC;IAC7CN,cAAc,CAAC,GAAG,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,UAAU,CAAC;IAC5CN,cAAc,CAAC,IAAI,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,UAAU,CAAC;IAC7CN,cAAc,CAAC,EAAE,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,cAAc,CAAC;IAC/CN,cAAc,CAAC,IAAI,GAAG,EAAE,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,cAAc,CAAC;IACtDN,cAAc,CAAC,GAAG,GAAG,EAAE,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,eAAe,CAAC;IACtDN,cAAc,CAAC,IAAI,GAAG,EAAE,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,eAAe,CAAC;IACvDN,cAAc,CAAC,GAAG,GAAG,EAAE,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,eAAe,CAAC;EACvD,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
package/modules/style/twitter.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { day, getDate } from '../steps/index.js';
|
|
2
|
-
import { intlDateTimeFormatSupported } from '../locale.js';
|
|
2
|
+
import { intlDateTimeFormatSupported } from '../locale.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// For compatibility with the old versions of this library.
|
|
5
|
+
import renameLegacyProperties from './renameLegacyProperties.js';
|
|
6
|
+
|
|
7
|
+
// Twitter-style relative date/time formatting.
|
|
5
8
|
// ("1m", "2h", "Mar 3", "Apr 4, 2012").
|
|
6
9
|
//
|
|
7
10
|
// Seconds, minutes or hours are shown for shorter intervals,
|
|
@@ -13,15 +16,17 @@ var steps = [{
|
|
|
13
16
|
formatAs: 'minute'
|
|
14
17
|
}, {
|
|
15
18
|
formatAs: 'hour'
|
|
16
|
-
}];
|
|
17
|
-
// for various locales (is a global variable).
|
|
19
|
+
}];
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
// A cache for `Intl.DateTimeFormat` formatters
|
|
22
|
+
// for various locales (is a global variable).
|
|
23
|
+
var formatters = {};
|
|
20
24
|
|
|
25
|
+
// Starting from day intervals, output month and day.
|
|
21
26
|
var monthAndDay = {
|
|
22
27
|
minTime: function minTime(timestamp, _ref) {
|
|
23
28
|
var future = _ref.future,
|
|
24
|
-
|
|
29
|
+
getMinTimeForUnit = _ref.getMinTimeForUnit;
|
|
25
30
|
// Returns `23.5 * 60 * 60` when `round` is "round",
|
|
26
31
|
// and `24 * 60 * 60` when `round` is "floor".
|
|
27
32
|
return getMinTimeForUnit('day');
|
|
@@ -32,27 +37,24 @@ var monthAndDay = {
|
|
|
32
37
|
formatters[locale] = {};
|
|
33
38
|
}
|
|
34
39
|
/* istanbul ignore else */
|
|
35
|
-
|
|
36
|
-
|
|
37
40
|
if (!formatters[locale].dayMonth) {
|
|
38
41
|
// "Apr 11" (MMMd)
|
|
39
42
|
formatters[locale].dayMonth = new Intl.DateTimeFormat(locale, {
|
|
40
43
|
month: 'short',
|
|
41
44
|
day: 'numeric'
|
|
42
45
|
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
}
|
|
47
|
+
// Output month and day.
|
|
46
48
|
return formatters[locale].dayMonth.format(getDate(value));
|
|
47
49
|
}
|
|
48
|
-
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// If the `date` happened/happens outside of current year,
|
|
49
53
|
// then output day, month and year.
|
|
50
54
|
// The interval should be such that the `date` lies outside of the current year.
|
|
51
|
-
|
|
52
55
|
var yearMonthAndDay = {
|
|
53
56
|
minTime: function minTime(timestamp, _ref2) {
|
|
54
57
|
var future = _ref2.future;
|
|
55
|
-
|
|
56
58
|
if (future) {
|
|
57
59
|
// January 1, 00:00, of the `date`'s year is right after
|
|
58
60
|
// the maximum `now` for formatting a future date:
|
|
@@ -61,8 +63,8 @@ var yearMonthAndDay = {
|
|
|
61
63
|
// After that, it's hours, minutes, seconds, and after that it's no longer `future`.
|
|
62
64
|
// The date is right after the maximum `now` for formatting a future date,
|
|
63
65
|
// so subtract 1 millisecond from it.
|
|
64
|
-
var maxFittingNow = new Date(new Date(timestamp).getFullYear(), 0).getTime() - 1;
|
|
65
|
-
|
|
66
|
+
var maxFittingNow = new Date(new Date(timestamp).getFullYear(), 0).getTime() - 1;
|
|
67
|
+
// Return `minTime` (in seconds).
|
|
66
68
|
return (timestamp - maxFittingNow) / 1000;
|
|
67
69
|
} else {
|
|
68
70
|
// January 1, 00:00, of the year following the `date`'s year
|
|
@@ -70,8 +72,8 @@ var yearMonthAndDay = {
|
|
|
70
72
|
// When `now` is before that date, the `date` is formatted as "day/month" (another step),
|
|
71
73
|
// When `now` is equal to or after that date, the `date` is formatted as "day/month/year" (this step).
|
|
72
74
|
// After that, it's hours, minutes, seconds, and after that it's no longer `future`.
|
|
73
|
-
var minFittingNow = new Date(new Date(timestamp).getFullYear() + 1, 0).getTime();
|
|
74
|
-
|
|
75
|
+
var minFittingNow = new Date(new Date(timestamp).getFullYear() + 1, 0).getTime();
|
|
76
|
+
// Return `minTime` (in seconds).
|
|
75
77
|
return (minFittingNow - timestamp) / 1000;
|
|
76
78
|
}
|
|
77
79
|
},
|
|
@@ -81,8 +83,6 @@ var yearMonthAndDay = {
|
|
|
81
83
|
formatters[locale] = {};
|
|
82
84
|
}
|
|
83
85
|
/* istanbul ignore else */
|
|
84
|
-
|
|
85
|
-
|
|
86
86
|
if (!formatters[locale].dayMonthYear) {
|
|
87
87
|
// "Apr 11, 2017" (yMMMd)
|
|
88
88
|
formatters[locale].dayMonthYear = new Intl.DateTimeFormat(locale, {
|
|
@@ -90,19 +90,19 @@ var yearMonthAndDay = {
|
|
|
90
90
|
month: 'short',
|
|
91
91
|
day: 'numeric'
|
|
92
92
|
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
}
|
|
94
|
+
// Output day, month and year.
|
|
96
95
|
return formatters[locale].dayMonthYear.format(getDate(value));
|
|
97
96
|
}
|
|
98
|
-
};
|
|
99
|
-
// then longer time intervals will be formatted as dates.
|
|
97
|
+
};
|
|
100
98
|
|
|
99
|
+
// If `Intl.DateTimeFormat` is supported,
|
|
100
|
+
// then longer time intervals will be formatted as dates.
|
|
101
101
|
/* istanbul ignore else */
|
|
102
|
-
|
|
103
102
|
if (intlDateTimeFormatSupported()) {
|
|
104
103
|
steps.push(monthAndDay, yearMonthAndDay);
|
|
105
|
-
}
|
|
104
|
+
}
|
|
105
|
+
// Otherwise, if `Intl.DateTimeFormat` is not supported,
|
|
106
106
|
// which could be the case when using Internet Explorer,
|
|
107
107
|
// then simply mimick "round" steps.
|
|
108
108
|
else {
|
|
@@ -116,18 +116,21 @@ else {
|
|
|
116
116
|
formatAs: 'year'
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
|
|
120
119
|
export default {
|
|
121
120
|
steps: steps,
|
|
122
|
-
labels: [
|
|
123
|
-
|
|
124
|
-
'
|
|
121
|
+
labels: [
|
|
122
|
+
// "mini" labels are only defined for a few languages.
|
|
123
|
+
'mini',
|
|
124
|
+
// "short-time" labels are only defined for a few languages.
|
|
125
|
+
'short-time',
|
|
126
|
+
// "narrow" and "short" labels are defined for all languages.
|
|
125
127
|
// "narrow" labels can sometimes be weird (like "+5d."),
|
|
126
128
|
// but "short" labels have the " ago" part, so "narrow" seem
|
|
127
129
|
// more appropriate.
|
|
128
130
|
// "short" labels would have been more appropriate if they
|
|
129
131
|
// didn't have the " ago" part, hence the "short-time" above.
|
|
130
|
-
'narrow',
|
|
132
|
+
'narrow',
|
|
133
|
+
// Since "narrow" labels are always present, "short" element
|
|
131
134
|
// of this array can be removed.
|
|
132
135
|
'short']
|
|
133
136
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitter.js","names":["day","getDate","intlDateTimeFormatSupported","renameLegacyProperties","steps","formatAs","formatters","monthAndDay","minTime","timestamp","future","getMinTimeForUnit","format","value","locale","dayMonth","Intl","DateTimeFormat","month","yearMonthAndDay","maxFittingNow","Date","getFullYear","getTime","minFittingNow","dayMonthYear","year","push","labels"],"sources":["../../source/style/twitter.js"],"sourcesContent":["import { day, getDate } from '../steps/index.js'\r\nimport { intlDateTimeFormatSupported } from '../locale.js'\r\n\r\n// For compatibility with the old versions of this library.\r\nimport renameLegacyProperties from './renameLegacyProperties.js'\r\n\r\n// Twitter-style relative date/time formatting.\r\n// (\"1m\", \"2h\", \"Mar 3\", \"Apr 4, 2012\").\r\n//\r\n// Seconds, minutes or hours are shown for shorter intervals,\r\n// and longer intervals are formatted using full date format.\r\n\r\nconst steps = [\r\n\t{\r\n\t\tformatAs: 'second'\r\n\t},\r\n\t{\r\n\t\tformatAs: 'minute'\r\n\t},\r\n\t{\r\n\t\tformatAs: 'hour'\r\n\t}\r\n]\r\n\r\n// A cache for `Intl.DateTimeFormat` formatters\r\n// for various locales (is a global variable).\r\nconst formatters = {}\r\n\r\n// Starting from day intervals, output month and day.\r\nconst monthAndDay = {\r\n\tminTime(timestamp, { future, getMinTimeForUnit }) {\r\n\t\t// Returns `23.5 * 60 * 60` when `round` is \"round\",\r\n\t\t// and `24 * 60 * 60` when `round` is \"floor\".\r\n\t\treturn getMinTimeForUnit('day')\r\n\t},\r\n\tformat(value, locale) {\r\n\t\t/* istanbul ignore else */\r\n\t\tif (!formatters[locale]) {\r\n\t\t\tformatters[locale] = {}\r\n\t\t}\r\n\t\t/* istanbul ignore else */\r\n\t\tif (!formatters[locale].dayMonth) {\r\n\t\t\t// \"Apr 11\" (MMMd)\r\n\t\t\tformatters[locale].dayMonth = new Intl.DateTimeFormat(locale, {\r\n\t\t\t\tmonth: 'short',\r\n\t\t\t\tday: 'numeric'\r\n\t\t\t})\r\n\t\t}\r\n\t\t// Output month and day.\r\n\t\treturn formatters[locale].dayMonth.format(getDate(value))\r\n\t}\r\n}\r\n\r\n// If the `date` happened/happens outside of current year,\r\n// then output day, month and year.\r\n// The interval should be such that the `date` lies outside of the current year.\r\nconst yearMonthAndDay = {\r\n\tminTime(timestamp, { future }) {\r\n\t\tif (future) {\r\n\t\t\t// January 1, 00:00, of the `date`'s year is right after\r\n\t\t\t// the maximum `now` for formatting a future date:\r\n\t\t\t// When `now` is before that date, the `date` is formatted as \"day/month/year\" (this step),\r\n\t\t\t// When `now` is equal to or after that date, the `date` is formatted as \"day/month\" (another step).\r\n\t\t\t// After that, it's hours, minutes, seconds, and after that it's no longer `future`.\r\n\t\t\t// The date is right after the maximum `now` for formatting a future date,\r\n\t\t\t// so subtract 1 millisecond from it.\r\n\t\t\tconst maxFittingNow = new Date(new Date(timestamp).getFullYear(), 0).getTime() - 1\r\n\t\t\t// Return `minTime` (in seconds).\r\n\t\t\treturn (timestamp - maxFittingNow) / 1000\r\n\t\t} else {\r\n\t\t\t// January 1, 00:00, of the year following the `date`'s year\r\n\t\t\t// is the minimum `now` for formatting a past date:\r\n\t\t\t// When `now` is before that date, the `date` is formatted as \"day/month\" (another step),\r\n\t\t\t// When `now` is equal to or after that date, the `date` is formatted as \"day/month/year\" (this step).\r\n\t\t\t// After that, it's hours, minutes, seconds, and after that it's no longer `future`.\r\n\t\t\tconst minFittingNow = new Date(new Date(timestamp).getFullYear() + 1, 0).getTime()\r\n\t\t\t// Return `minTime` (in seconds).\r\n\t\t\treturn (minFittingNow - timestamp) / 1000\r\n\t\t}\r\n\t},\r\n\tformat(value, locale) {\r\n\t\t/* istanbul ignore if */\r\n\t\tif (!formatters[locale]) {\r\n\t\t\tformatters[locale] = {}\r\n\t\t}\r\n\t\t/* istanbul ignore else */\r\n\t\tif (!formatters[locale].dayMonthYear) {\r\n\t\t\t// \"Apr 11, 2017\" (yMMMd)\r\n\t\t\tformatters[locale].dayMonthYear = new Intl.DateTimeFormat(locale, {\r\n\t\t\t\tyear: 'numeric',\r\n\t\t\t\tmonth: 'short',\r\n\t\t\t\tday: 'numeric'\r\n\t\t\t})\r\n\t\t}\r\n\t\t// Output day, month and year.\r\n\t\treturn formatters[locale].dayMonthYear.format(getDate(value))\r\n\t}\r\n}\r\n\r\n// If `Intl.DateTimeFormat` is supported,\r\n// then longer time intervals will be formatted as dates.\r\n/* istanbul ignore else */\r\nif (intlDateTimeFormatSupported()) {\r\n\tsteps.push(monthAndDay, yearMonthAndDay)\r\n}\r\n// Otherwise, if `Intl.DateTimeFormat` is not supported,\r\n// which could be the case when using Internet Explorer,\r\n// then simply mimick \"round\" steps.\r\nelse {\r\n\tsteps.push(\r\n\t\t{\r\n\t\t\tformatAs: 'day'\r\n\t\t},\r\n\t\t{\r\n\t\t\tformatAs: 'week'\r\n\t\t},\r\n\t\t{\r\n\t\t\tformatAs: 'month'\r\n\t\t},\r\n\t\t{\r\n\t\t\tformatAs: 'year'\r\n\t\t}\r\n\t)\r\n}\r\n\r\nexport default {\r\n\tsteps,\r\n\tlabels: [\r\n\t\t// \"mini\" labels are only defined for a few languages.\r\n\t\t'mini',\r\n\t\t// \"short-time\" labels are only defined for a few languages.\r\n\t\t'short-time',\r\n\t\t// \"narrow\" and \"short\" labels are defined for all languages.\r\n\t\t// \"narrow\" labels can sometimes be weird (like \"+5d.\"),\r\n\t\t// but \"short\" labels have the \" ago\" part, so \"narrow\" seem\r\n\t\t// more appropriate.\r\n\t\t// \"short\" labels would have been more appropriate if they\r\n\t\t// didn't have the \" ago\" part, hence the \"short-time\" above.\r\n\t\t'narrow',\r\n\t\t// Since \"narrow\" labels are always present, \"short\" element\r\n\t\t// of this array can be removed.\r\n\t\t'short'\r\n\t]\r\n}"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"twitter.js","names":["day","getDate","intlDateTimeFormatSupported","renameLegacyProperties","steps","formatAs","formatters","monthAndDay","minTime","timestamp","_ref","future","getMinTimeForUnit","format","value","locale","dayMonth","Intl","DateTimeFormat","month","yearMonthAndDay","_ref2","maxFittingNow","Date","getFullYear","getTime","minFittingNow","dayMonthYear","year","push","labels"],"sources":["../../source/style/twitter.js"],"sourcesContent":["import { day, getDate } from '../steps/index.js'\r\nimport { intlDateTimeFormatSupported } from '../locale.js'\r\n\r\n// For compatibility with the old versions of this library.\r\nimport renameLegacyProperties from './renameLegacyProperties.js'\r\n\r\n// Twitter-style relative date/time formatting.\r\n// (\"1m\", \"2h\", \"Mar 3\", \"Apr 4, 2012\").\r\n//\r\n// Seconds, minutes or hours are shown for shorter intervals,\r\n// and longer intervals are formatted using full date format.\r\n\r\nconst steps = [\r\n\t{\r\n\t\tformatAs: 'second'\r\n\t},\r\n\t{\r\n\t\tformatAs: 'minute'\r\n\t},\r\n\t{\r\n\t\tformatAs: 'hour'\r\n\t}\r\n]\r\n\r\n// A cache for `Intl.DateTimeFormat` formatters\r\n// for various locales (is a global variable).\r\nconst formatters = {}\r\n\r\n// Starting from day intervals, output month and day.\r\nconst monthAndDay = {\r\n\tminTime(timestamp, { future, getMinTimeForUnit }) {\r\n\t\t// Returns `23.5 * 60 * 60` when `round` is \"round\",\r\n\t\t// and `24 * 60 * 60` when `round` is \"floor\".\r\n\t\treturn getMinTimeForUnit('day')\r\n\t},\r\n\tformat(value, locale) {\r\n\t\t/* istanbul ignore else */\r\n\t\tif (!formatters[locale]) {\r\n\t\t\tformatters[locale] = {}\r\n\t\t}\r\n\t\t/* istanbul ignore else */\r\n\t\tif (!formatters[locale].dayMonth) {\r\n\t\t\t// \"Apr 11\" (MMMd)\r\n\t\t\tformatters[locale].dayMonth = new Intl.DateTimeFormat(locale, {\r\n\t\t\t\tmonth: 'short',\r\n\t\t\t\tday: 'numeric'\r\n\t\t\t})\r\n\t\t}\r\n\t\t// Output month and day.\r\n\t\treturn formatters[locale].dayMonth.format(getDate(value))\r\n\t}\r\n}\r\n\r\n// If the `date` happened/happens outside of current year,\r\n// then output day, month and year.\r\n// The interval should be such that the `date` lies outside of the current year.\r\nconst yearMonthAndDay = {\r\n\tminTime(timestamp, { future }) {\r\n\t\tif (future) {\r\n\t\t\t// January 1, 00:00, of the `date`'s year is right after\r\n\t\t\t// the maximum `now` for formatting a future date:\r\n\t\t\t// When `now` is before that date, the `date` is formatted as \"day/month/year\" (this step),\r\n\t\t\t// When `now` is equal to or after that date, the `date` is formatted as \"day/month\" (another step).\r\n\t\t\t// After that, it's hours, minutes, seconds, and after that it's no longer `future`.\r\n\t\t\t// The date is right after the maximum `now` for formatting a future date,\r\n\t\t\t// so subtract 1 millisecond from it.\r\n\t\t\tconst maxFittingNow = new Date(new Date(timestamp).getFullYear(), 0).getTime() - 1\r\n\t\t\t// Return `minTime` (in seconds).\r\n\t\t\treturn (timestamp - maxFittingNow) / 1000\r\n\t\t} else {\r\n\t\t\t// January 1, 00:00, of the year following the `date`'s year\r\n\t\t\t// is the minimum `now` for formatting a past date:\r\n\t\t\t// When `now` is before that date, the `date` is formatted as \"day/month\" (another step),\r\n\t\t\t// When `now` is equal to or after that date, the `date` is formatted as \"day/month/year\" (this step).\r\n\t\t\t// After that, it's hours, minutes, seconds, and after that it's no longer `future`.\r\n\t\t\tconst minFittingNow = new Date(new Date(timestamp).getFullYear() + 1, 0).getTime()\r\n\t\t\t// Return `minTime` (in seconds).\r\n\t\t\treturn (minFittingNow - timestamp) / 1000\r\n\t\t}\r\n\t},\r\n\tformat(value, locale) {\r\n\t\t/* istanbul ignore if */\r\n\t\tif (!formatters[locale]) {\r\n\t\t\tformatters[locale] = {}\r\n\t\t}\r\n\t\t/* istanbul ignore else */\r\n\t\tif (!formatters[locale].dayMonthYear) {\r\n\t\t\t// \"Apr 11, 2017\" (yMMMd)\r\n\t\t\tformatters[locale].dayMonthYear = new Intl.DateTimeFormat(locale, {\r\n\t\t\t\tyear: 'numeric',\r\n\t\t\t\tmonth: 'short',\r\n\t\t\t\tday: 'numeric'\r\n\t\t\t})\r\n\t\t}\r\n\t\t// Output day, month and year.\r\n\t\treturn formatters[locale].dayMonthYear.format(getDate(value))\r\n\t}\r\n}\r\n\r\n// If `Intl.DateTimeFormat` is supported,\r\n// then longer time intervals will be formatted as dates.\r\n/* istanbul ignore else */\r\nif (intlDateTimeFormatSupported()) {\r\n\tsteps.push(monthAndDay, yearMonthAndDay)\r\n}\r\n// Otherwise, if `Intl.DateTimeFormat` is not supported,\r\n// which could be the case when using Internet Explorer,\r\n// then simply mimick \"round\" steps.\r\nelse {\r\n\tsteps.push(\r\n\t\t{\r\n\t\t\tformatAs: 'day'\r\n\t\t},\r\n\t\t{\r\n\t\t\tformatAs: 'week'\r\n\t\t},\r\n\t\t{\r\n\t\t\tformatAs: 'month'\r\n\t\t},\r\n\t\t{\r\n\t\t\tformatAs: 'year'\r\n\t\t}\r\n\t)\r\n}\r\n\r\nexport default {\r\n\tsteps,\r\n\tlabels: [\r\n\t\t// \"mini\" labels are only defined for a few languages.\r\n\t\t'mini',\r\n\t\t// \"short-time\" labels are only defined for a few languages.\r\n\t\t'short-time',\r\n\t\t// \"narrow\" and \"short\" labels are defined for all languages.\r\n\t\t// \"narrow\" labels can sometimes be weird (like \"+5d.\"),\r\n\t\t// but \"short\" labels have the \" ago\" part, so \"narrow\" seem\r\n\t\t// more appropriate.\r\n\t\t// \"short\" labels would have been more appropriate if they\r\n\t\t// didn't have the \" ago\" part, hence the \"short-time\" above.\r\n\t\t'narrow',\r\n\t\t// Since \"narrow\" labels are always present, \"short\" element\r\n\t\t// of this array can be removed.\r\n\t\t'short'\r\n\t]\r\n}"],"mappings":"AAAA,SAASA,GAAG,EAAEC,OAAO,QAAQ,mBAAmB;AAChD,SAASC,2BAA2B,QAAQ,cAAc;;AAE1D;AACA,OAAOC,sBAAsB,MAAM,6BAA6B;;AAEhE;AACA;AACA;AACA;AACA;;AAEA,IAAMC,KAAK,GAAG,CACb;EACCC,QAAQ,EAAE;AACX,CAAC,EACD;E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