javascript-time-ago 2.5.11 → 2.6.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/CHANGELOG.md +10 -1
- package/README.md +410 -272
- 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/FullDateFormatter.js +72 -0
- package/commonjs/FullDateFormatter.js.map +1 -0
- package/commonjs/FullDateFormatter.test.js +26 -0
- package/commonjs/FullDateFormatter.test.js.map +1 -0
- 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 +300 -253
- package/commonjs/TimeAgo.js.map +1 -1
- package/commonjs/TimeAgo.test.js +214 -135
- 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 +31 -39
- 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 +27 -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 -39
- package/commonjs/style/twitter.js.map +1 -1
- package/commonjs/style/twitter.test.js +54 -57
- 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/full-date-formatter/index.cjs +4 -0
- package/full-date-formatter/index.cjs.js +9 -0
- package/full-date-formatter/index.d.ts +6 -0
- package/full-date-formatter/index.js +1 -0
- package/full-date-formatter/package.json +15 -0
- package/index.cjs +1 -1
- package/index.cjs.js +2 -2
- package/index.d.ts +14 -4
- package/index.js +3 -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/FullDateFormatter.js +67 -0
- package/modules/FullDateFormatter.js.map +1 -0
- package/modules/FullDateFormatter.test.js +22 -0
- package/modules/FullDateFormatter.test.js.map +1 -0
- 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 +299 -237
- package/modules/TimeAgo.js.map +1 -1
- package/modules/TimeAgo.test.js +217 -119
- 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 +31 -36
- package/modules/steps/getStepMinTime.js.map +1 -1
- package/modules/steps/getStepMinTime.test.js.map +1 -1
- package/modules/steps/getTimeToNextUpdate.js +28 -32
- 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 +36 -33
- package/modules/style/twitter.js.map +1 -1
- package/modules/style/twitter.test.js +53 -52
- 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 +275 -13
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
-
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
-
|
|
17
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
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); }
|
|
19
13
|
import round from './round.js';
|
|
20
14
|
import TimeAgo from '../TimeAgo.js';
|
|
21
15
|
import { day, month, year } from '../steps/index.js';
|
|
@@ -23,7 +17,6 @@ describe('style/round', function () {
|
|
|
23
17
|
it('should format relative time (English) (round: "floor")', function () {
|
|
24
18
|
var timeAgo = new TimeAgo('en');
|
|
25
19
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
26
|
-
|
|
27
20
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
28
21
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
29
22
|
now: now
|
|
@@ -31,7 +24,6 @@ describe('style/round', function () {
|
|
|
31
24
|
round: 'floor'
|
|
32
25
|
}));
|
|
33
26
|
};
|
|
34
|
-
|
|
35
27
|
formatInterval(0).should.equal('just now');
|
|
36
28
|
formatInterval(0.9).should.equal('just now');
|
|
37
29
|
formatInterval(1).should.equal('1 second ago');
|
|
@@ -40,46 +32,46 @@ describe('style/round', function () {
|
|
|
40
32
|
formatInterval(1.9 * 60).should.equal('1 minute ago');
|
|
41
33
|
formatInterval(2 * 60).should.equal('2 minutes ago');
|
|
42
34
|
formatInterval(2.9 * 60).should.equal('2 minutes ago');
|
|
43
|
-
formatInterval(3 * 60).should.equal('3 minutes ago');
|
|
44
|
-
|
|
35
|
+
formatInterval(3 * 60).should.equal('3 minutes ago');
|
|
36
|
+
// …
|
|
45
37
|
formatInterval(59.9 * 60).should.equal('59 minutes ago');
|
|
46
38
|
formatInterval(60 * 60).should.equal('1 hour ago');
|
|
47
39
|
formatInterval(1.9 * 60 * 60).should.equal('1 hour ago');
|
|
48
40
|
formatInterval(2 * 60 * 60).should.equal('2 hours ago');
|
|
49
41
|
formatInterval(2.9 * 60 * 60).should.equal('2 hours ago');
|
|
50
|
-
formatInterval(3 * 60 * 60).should.equal('3 hours ago');
|
|
51
|
-
|
|
42
|
+
formatInterval(3 * 60 * 60).should.equal('3 hours ago');
|
|
43
|
+
// …
|
|
52
44
|
formatInterval(23.9 * 60 * 60).should.equal('23 hours ago');
|
|
53
45
|
formatInterval(24 * 60 * 60).should.equal('1 day ago');
|
|
54
46
|
formatInterval(1.9 * day).should.equal('1 day ago');
|
|
55
47
|
formatInterval(2 * day).should.equal('2 days ago');
|
|
56
48
|
formatInterval(2.9 * day).should.equal('2 days ago');
|
|
57
|
-
formatInterval(3 * day).should.equal('3 days ago');
|
|
58
|
-
|
|
49
|
+
formatInterval(3 * day).should.equal('3 days ago');
|
|
50
|
+
// …
|
|
59
51
|
formatInterval(6.9 * day).should.equal('6 days ago');
|
|
60
|
-
formatInterval(7 * day).should.equal('1 week ago');
|
|
61
|
-
|
|
52
|
+
formatInterval(7 * day).should.equal('1 week ago');
|
|
53
|
+
// …
|
|
62
54
|
formatInterval(3.9 * 7 * day).should.equal('3 weeks ago');
|
|
63
55
|
formatInterval(4 * 7 * day).should.equal('4 weeks ago');
|
|
64
56
|
formatInterval(30.51 * day).should.equal('1 month ago');
|
|
65
57
|
formatInterval(1.9 * month).should.equal('1 month ago');
|
|
66
58
|
formatInterval(2 * month).should.equal('2 months ago');
|
|
67
59
|
formatInterval(2.9 * month).should.equal('2 months ago');
|
|
68
|
-
formatInterval(3 * month).should.equal('3 months ago');
|
|
69
|
-
|
|
60
|
+
formatInterval(3 * month).should.equal('3 months ago');
|
|
61
|
+
// …
|
|
70
62
|
formatInterval(11.9 * month).should.equal('11 months ago');
|
|
71
63
|
formatInterval(12 * month).should.equal('1 year ago');
|
|
72
64
|
formatInterval(1.99 * year).should.equal('1 year ago');
|
|
73
|
-
formatInterval(2 * year).should.equal('2 years ago');
|
|
74
|
-
//
|
|
65
|
+
formatInterval(2 * year).should.equal('2 years ago');
|
|
66
|
+
// …
|
|
75
67
|
|
|
68
|
+
// Test future dates.
|
|
76
69
|
formatInterval(-1 * 3).should.equal('in 3 seconds');
|
|
77
70
|
formatInterval(-1 * month * 8).should.equal('in 8 months');
|
|
78
71
|
});
|
|
79
72
|
it('should format relative time (English) (round: "round")', function () {
|
|
80
73
|
var timeAgo = new TimeAgo('en');
|
|
81
74
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
82
|
-
|
|
83
75
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
84
76
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
85
77
|
now: now
|
|
@@ -87,7 +79,6 @@ describe('style/round', function () {
|
|
|
87
79
|
round: 'round'
|
|
88
80
|
}));
|
|
89
81
|
};
|
|
90
|
-
|
|
91
82
|
formatInterval(0).should.equal('just now');
|
|
92
83
|
formatInterval(0.49).should.equal('just now');
|
|
93
84
|
formatInterval(0.5).should.equal('1 second ago');
|
|
@@ -96,67 +87,64 @@ describe('style/round', function () {
|
|
|
96
87
|
formatInterval(1.49 * 60).should.equal('1 minute ago');
|
|
97
88
|
formatInterval(1.5 * 60).should.equal('2 minutes ago');
|
|
98
89
|
formatInterval(2.49 * 60).should.equal('2 minutes ago');
|
|
99
|
-
formatInterval(2.5 * 60).should.equal('3 minutes ago');
|
|
100
|
-
|
|
90
|
+
formatInterval(2.5 * 60).should.equal('3 minutes ago');
|
|
91
|
+
// …
|
|
101
92
|
formatInterval(59.49 * 60).should.equal('59 minutes ago');
|
|
102
93
|
formatInterval(59.5 * 60).should.equal('1 hour ago');
|
|
103
94
|
formatInterval(1.49 * 60 * 60).should.equal('1 hour ago');
|
|
104
95
|
formatInterval(1.5 * 60 * 60).should.equal('2 hours ago');
|
|
105
96
|
formatInterval(2.49 * 60 * 60).should.equal('2 hours ago');
|
|
106
|
-
formatInterval(2.5 * 60 * 60).should.equal('3 hours ago');
|
|
107
|
-
|
|
97
|
+
formatInterval(2.5 * 60 * 60).should.equal('3 hours ago');
|
|
98
|
+
// …
|
|
108
99
|
formatInterval(23.49 * 60 * 60).should.equal('23 hours ago');
|
|
109
100
|
formatInterval(23.5 * 60 * 60).should.equal('1 day ago');
|
|
110
101
|
formatInterval(1.49 * day).should.equal('1 day ago');
|
|
111
102
|
formatInterval(1.5 * day).should.equal('2 days ago');
|
|
112
103
|
formatInterval(2.49 * day).should.equal('2 days ago');
|
|
113
|
-
formatInterval(2.5 * day).should.equal('3 days ago');
|
|
114
|
-
|
|
104
|
+
formatInterval(2.5 * day).should.equal('3 days ago');
|
|
105
|
+
// …
|
|
115
106
|
formatInterval(6.49 * day).should.equal('6 days ago');
|
|
116
|
-
formatInterval(6.5 * day).should.equal('1 week ago');
|
|
117
|
-
|
|
107
|
+
formatInterval(6.5 * day).should.equal('1 week ago');
|
|
108
|
+
// …
|
|
118
109
|
formatInterval(3.49 * 7 * day).should.equal('3 weeks ago');
|
|
119
110
|
formatInterval(3.5 * 7 * day).should.equal('4 weeks ago');
|
|
120
111
|
formatInterval(30.51 * day).should.equal('1 month ago');
|
|
121
112
|
formatInterval(1.49 * month).should.equal('1 month ago');
|
|
122
113
|
formatInterval(1.5 * month).should.equal('2 months ago');
|
|
123
114
|
formatInterval(2.49 * month).should.equal('2 months ago');
|
|
124
|
-
formatInterval(2.5 * month).should.equal('3 months ago');
|
|
125
|
-
|
|
115
|
+
formatInterval(2.5 * month).should.equal('3 months ago');
|
|
116
|
+
// …
|
|
126
117
|
formatInterval(11.49 * month).should.equal('11 months ago');
|
|
127
118
|
formatInterval(11.5 * month).should.equal('1 year ago');
|
|
128
119
|
formatInterval(1.49 * year).should.equal('1 year ago');
|
|
129
|
-
formatInterval(1.5 * year).should.equal('2 years ago');
|
|
130
|
-
//
|
|
120
|
+
formatInterval(1.5 * year).should.equal('2 years ago');
|
|
121
|
+
// …
|
|
131
122
|
|
|
123
|
+
// Test future dates.
|
|
132
124
|
formatInterval(-1 * 3).should.equal('in 3 seconds');
|
|
133
125
|
formatInterval(-1 * month * 8).should.equal('in 8 months');
|
|
134
126
|
});
|
|
135
127
|
it('should return correct update interval (round: "floor")', function () {
|
|
136
128
|
var timeAgo = new TimeAgo('en');
|
|
137
|
-
|
|
138
129
|
var _timeAgo$format = timeAgo.format(0, round, {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
130
|
+
now: 0,
|
|
131
|
+
getTimeToNextUpdate: true,
|
|
132
|
+
round: 'floor'
|
|
133
|
+
}),
|
|
134
|
+
_timeAgo$format2 = _slicedToArray(_timeAgo$format, 2),
|
|
135
|
+
formattedDate = _timeAgo$format2[0],
|
|
136
|
+
timeToNextUpdate = _timeAgo$format2[1];
|
|
147
137
|
timeToNextUpdate.should.equal(1000);
|
|
148
138
|
});
|
|
149
139
|
it('should return correct update interval (round: "round")', function () {
|
|
150
140
|
var timeAgo = new TimeAgo('en');
|
|
151
|
-
|
|
152
141
|
var _timeAgo$format3 = timeAgo.format(0, round, {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
142
|
+
now: 0,
|
|
143
|
+
getTimeToNextUpdate: true
|
|
144
|
+
}),
|
|
145
|
+
_timeAgo$format4 = _slicedToArray(_timeAgo$format3, 2),
|
|
146
|
+
formattedDate = _timeAgo$format4[0],
|
|
147
|
+
timeToNextUpdate = _timeAgo$format4[1];
|
|
160
148
|
timeToNextUpdate.should.equal(500);
|
|
161
149
|
});
|
|
162
150
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"round.test.js","names":["round","TimeAgo","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","should","equal","getTimeToNextUpdate","formattedDate","timeToNextUpdate"],"sources":["../../source/style/round.test.js"],"sourcesContent":["import round from './round.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/round', () => {\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, ...round, 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('1 second ago')\r\n\t\tformatInterval(59.9).should.equal('59 seconds ago')\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).should.equal('in 3 seconds')\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) (round: \"round\")', () => {\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, ...round, round: 'round' })\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('1 second ago')\r\n\t\tformatInterval(59.49).should.equal('59 seconds ago')\r\n\t\tformatInterval(59.5).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\t// …\r\n\t\tformatInterval(59.49 * 60).should.equal('59 minutes ago')\r\n\t\tformatInterval(59.5 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(1.49 * 60 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(1.5 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(2.49 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(2.5 * 60 * 60).should.equal('3 hours ago')\r\n\t\t// …\r\n\t\tformatInterval(23.49 * 60 * 60).should.equal('23 hours ago')\r\n\t\tformatInterval(23.5 * 60 * 60).should.equal('1 day ago')\r\n\t\tformatInterval(1.49 * day).should.equal('1 day ago')\r\n\t\tformatInterval(1.5 * day).should.equal('2 days ago')\r\n\t\tformatInterval(2.49 * day).should.equal('2 days ago')\r\n\t\tformatInterval(2.5 * day).should.equal('3 days ago')\r\n\t\t// …\r\n\t\tformatInterval(6.49 * day).should.equal('6 days ago')\r\n\t\tformatInterval(6.5 * day).should.equal('1 week ago')\r\n\t\t// …\r\n\t\tformatInterval(3.49 * 7 * day).should.equal('3 weeks ago')\r\n\t\tformatInterval(3.5 * 7 * day).should.equal('4 weeks ago')\r\n\t\tformatInterval(30.51 * day).should.equal('1 month ago')\r\n\t\tformatInterval(1.49 * month).should.equal('1 month ago')\r\n\t\tformatInterval(1.5 * month).should.equal('2 months ago')\r\n\t\tformatInterval(2.49 * month).should.equal('2 months ago')\r\n\t\tformatInterval(2.5 * month).should.equal('3 months ago')\r\n\t\t// …\r\n\t\tformatInterval(11.49 * month).should.equal('11 months ago')\r\n\t\tformatInterval(11.5 * month).should.equal('1 year ago')\r\n\t\tformatInterval(1.49 * year).should.equal('1 year ago')\r\n\t\tformatInterval(1.5 * 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).should.equal('in 3 seconds')\r\n\t\tformatInterval(-1 * month * 8).should.equal('in 8 months')\r\n\t})\r\n\r\n\tit('should return correct update interval (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst [\r\n\t\t\tformattedDate,\r\n\t\t\ttimeToNextUpdate\r\n\t\t] = timeAgo.format(0, round, {\r\n\t\t\tnow: 0,\r\n\t\t\tgetTimeToNextUpdate: true,\r\n\t\t\tround: 'floor'\r\n\t\t})\r\n\t\ttimeToNextUpdate.should.equal(1000)\r\n\t})\r\n\r\n\tit('should return correct update interval (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst [\r\n\t\t\tformattedDate,\r\n\t\t\ttimeToNextUpdate\r\n\t\t] = timeAgo.format(0, round, {\r\n\t\t\tnow: 0,\r\n\t\t\tgetTimeToNextUpdate: true\r\n\t\t})\r\n\t\ttimeToNextUpdate.should.equal(500)\r\n\t})\r\n})"],"m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B,CAA8BC,KAA9B,CAAoC,cAApC;IACAJ,cAAc,CAAC,CAAC,CAAD,GAAKR,KAAL,GAAa,CAAd,CAAd,CAA+BW,MAA/B,CAAsCC,KAAtC,CAA4C,aAA5C;EACA,CAlDC,CAAF;EAoDAT,EAAE,CAAC,wDAAD,EAA2D,YAAM;IAClE,IAAMC,OAAO,GAAG,IAAIN,OAAJ,CAAY,IAAZ,CAAhB;;IACA,sBAGIM,OAAO,CAACM,MAAR,CAAe,CAAf,EAAkBb,KAAlB,EAAyB;MAC5BQ,GAAG,EAAE,CADuB;MAE5BQ,mBAAmB,EAAE,IAFO;MAG5BhB,KAAK,EAAE;IAHqB,CAAzB,CAHJ;IAAA;IAAA,IACCiB,aADD;IAAA,IAECC,gBAFD;;IAQAA,gBAAgB,CAACJ,MAAjB,CAAwBC,KAAxB,CAA8B,IAA9B;EACA,CAXC,CAAF;EAaAT,EAAE,CAAC,wDAAD,EAA2D,YAAM;IAClE,IAAMC,OAAO,GAAG,IAAIN,OAAJ,CAAY,IAAZ,CAAhB;;IACA,uBAGIM,OAAO,CAACM,MAAR,CAAe,CAAf,EAAkBb,KAAlB,EAAyB;MAC5BQ,GAAG,EAAE,CADuB;MAE5BQ,mBAAmB,EAAE;IAFO,CAAzB,CAHJ;IAAA;IAAA,IACCC,aADD;IAAA,IAECC,gBAFD;;IAOAA,gBAAgB,CAACJ,MAAjB,CAAwBC,KAAxB,CAA8B,GAA9B;EACA,CAVC,CAAF;AAWA,CAjIO,CAAR"}
|
|
1
|
+
{"version":3,"file":"round.test.js","names":["round","TimeAgo","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","_objectSpread","should","equal","_timeAgo$format","getTimeToNextUpdate","_timeAgo$format2","_slicedToArray","formattedDate","timeToNextUpdate","_timeAgo$format3","_timeAgo$format4"],"sources":["../../source/style/round.test.js"],"sourcesContent":["import round from './round.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/round', () => {\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, ...round, 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('1 second ago')\r\n\t\tformatInterval(59.9).should.equal('59 seconds ago')\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).should.equal('in 3 seconds')\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) (round: \"round\")', () => {\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, ...round, round: 'round' })\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('1 second ago')\r\n\t\tformatInterval(59.49).should.equal('59 seconds ago')\r\n\t\tformatInterval(59.5).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\t// …\r\n\t\tformatInterval(59.49 * 60).should.equal('59 minutes ago')\r\n\t\tformatInterval(59.5 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(1.49 * 60 * 60).should.equal('1 hour ago')\r\n\t\tformatInterval(1.5 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(2.49 * 60 * 60).should.equal('2 hours ago')\r\n\t\tformatInterval(2.5 * 60 * 60).should.equal('3 hours ago')\r\n\t\t// …\r\n\t\tformatInterval(23.49 * 60 * 60).should.equal('23 hours ago')\r\n\t\tformatInterval(23.5 * 60 * 60).should.equal('1 day ago')\r\n\t\tformatInterval(1.49 * day).should.equal('1 day ago')\r\n\t\tformatInterval(1.5 * day).should.equal('2 days ago')\r\n\t\tformatInterval(2.49 * day).should.equal('2 days ago')\r\n\t\tformatInterval(2.5 * day).should.equal('3 days ago')\r\n\t\t// …\r\n\t\tformatInterval(6.49 * day).should.equal('6 days ago')\r\n\t\tformatInterval(6.5 * day).should.equal('1 week ago')\r\n\t\t// …\r\n\t\tformatInterval(3.49 * 7 * day).should.equal('3 weeks ago')\r\n\t\tformatInterval(3.5 * 7 * day).should.equal('4 weeks ago')\r\n\t\tformatInterval(30.51 * day).should.equal('1 month ago')\r\n\t\tformatInterval(1.49 * month).should.equal('1 month ago')\r\n\t\tformatInterval(1.5 * month).should.equal('2 months ago')\r\n\t\tformatInterval(2.49 * month).should.equal('2 months ago')\r\n\t\tformatInterval(2.5 * month).should.equal('3 months ago')\r\n\t\t// …\r\n\t\tformatInterval(11.49 * month).should.equal('11 months ago')\r\n\t\tformatInterval(11.5 * month).should.equal('1 year ago')\r\n\t\tformatInterval(1.49 * year).should.equal('1 year ago')\r\n\t\tformatInterval(1.5 * 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).should.equal('in 3 seconds')\r\n\t\tformatInterval(-1 * month * 8).should.equal('in 8 months')\r\n\t})\r\n\r\n\tit('should return correct update interval (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst [\r\n\t\t\tformattedDate,\r\n\t\t\ttimeToNextUpdate\r\n\t\t] = timeAgo.format(0, round, {\r\n\t\t\tnow: 0,\r\n\t\t\tgetTimeToNextUpdate: true,\r\n\t\t\tround: 'floor'\r\n\t\t})\r\n\t\ttimeToNextUpdate.should.equal(1000)\r\n\t})\r\n\r\n\tit('should return correct update interval (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst [\r\n\t\t\tformattedDate,\r\n\t\t\ttimeToNextUpdate\r\n\t\t] = timeAgo.format(0, round, {\r\n\t\t\tnow: 0,\r\n\t\t\tgetTimeToNextUpdate: true\r\n\t\t})\r\n\t\ttimeToNextUpdate.should.equal(500)\r\n\t})\r\n})"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,YAAY;AAC9B,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAEpDC,QAAQ,CAAC,aAAa,EAAE,YAAM;EAC7BC,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,GAAG,IAAI,EAAAE,aAAA,CAAAA,aAAA;QAAIN,GAAG,EAAHA;MAAG,GAAKR,KAAK;QAAEA,KAAK,EAAE;MAAO,EAAE,CAAC;IAAA;IAEvHW,cAAc,CAAC,CAAC,CAAC,CAACI,MAAM,CAACC,KAAK,CAAC,UAAU,CAAC;IAC1CL,cAAc,CAAC,GAAG,CAAC,CAACI,MAAM,CAACC,KAAK,CAAC,UAAU,CAAC;IAC5CL,cAAc,CAAC,CAAC,CAAC,CAACI,MAAM,CAACC,KAAK,CAAC,cAAc,CAAC;IAC9CL,cAAc,CAAC,IAAI,CAAC,CAACI,MAAM,CAACC,KAAK,CAAC,gB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,gBAAA;IAKjBF,gBAAgB,CAACP,MAAM,CAACC,KAAK,CAAC,GAAG,CAAC;EACnC,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
function
|
|
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
|
+
import round from './round.js';
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
|
|
7
|
-
import round from './round.js'; // just now
|
|
9
|
+
// just now
|
|
8
10
|
// 1 minute ago
|
|
9
11
|
// 2 minutes ago
|
|
10
12
|
// …
|
|
@@ -33,7 +35,6 @@ import round from './round.js'; // just now
|
|
|
33
35
|
// 2 years ago
|
|
34
36
|
// …
|
|
35
37
|
//
|
|
36
|
-
|
|
37
38
|
export default _objectSpread(_objectSpread({}, round), {}, {
|
|
38
39
|
// Skip "seconds".
|
|
39
40
|
steps: round.steps.filter(function (step) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roundMinute.js","names":["round","steps","filter","step","formatAs"],"sources":["../../source/style/roundMinute.js"],"sourcesContent":["import round from './round.js'\r\n\r\n// just now\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 hour ago\r\n// 2 hours ago\r\n// …\r\n// 24 hours ago\r\n// 1 day ago\r\n// 2 days ago\r\n// …\r\n// 6 days ago\r\n// 1 week ago\r\n// 2 weeks ago\r\n// 3 weeks ago\r\n// 4 weeks ago\r\n// 1 month ago\r\n// 2 months ago\r\n// …\r\n// 11 months ago\r\n// 1 year ago\r\n// 2 years ago\r\n// …\r\n//\r\nexport default {\r\n\t...round,\r\n\t// Skip \"seconds\".\r\n\tsteps: round.steps.filter(step => step.formatAs !== 'second')\r\n}"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"roundMinute.js","names":["round","_objectSpread","steps","filter","step","formatAs"],"sources":["../../source/style/roundMinute.js"],"sourcesContent":["import round from './round.js'\r\n\r\n// just now\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 hour ago\r\n// 2 hours ago\r\n// …\r\n// 24 hours ago\r\n// 1 day ago\r\n// 2 days ago\r\n// …\r\n// 6 days ago\r\n// 1 week ago\r\n// 2 weeks ago\r\n// 3 weeks ago\r\n// 4 weeks ago\r\n// 1 month ago\r\n// 2 months ago\r\n// …\r\n// 11 months ago\r\n// 1 year ago\r\n// 2 years ago\r\n// …\r\n//\r\nexport default {\r\n\t...round,\r\n\t// Skip \"seconds\".\r\n\tsteps: round.steps.filter(step => step.formatAs !== 'second')\r\n}"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,YAAY;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAAC,aAAA,CAAAA,aAAA,KACID,KAAK;EACR;EACAE,KAAK,EAAEF,KAAK,CAACE,KAAK,CAACC,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAIA,IAAI,CAACC,QAAQ,KAAK,QAAQ;EAAA;AAAC","ignoreList":[]}
|
|
@@ -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,wD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