fluent-transpiler 0.1.1 → 0.1.2
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/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -393,7 +393,7 @@ const formatTime = (value) => {
|
|
|
393
393
|
if (typeof value === 'string') value = new Date(value)
|
|
394
394
|
if (isNaN(value.getTime())) return value
|
|
395
395
|
try {
|
|
396
|
-
const [duration, unit] =
|
|
396
|
+
const [duration, unit] = __relativeTimeDiff(value)
|
|
397
397
|
return new Intl.RelativeTimeFormat(lang, options).format(duration, unit)
|
|
398
398
|
} catch (e) {}
|
|
399
399
|
return new Intl.DateTimeFormat(__locales, options).format(value)
|