react-i18nify
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -12,3 +12,3 @@ "use strict"; | ||
var _formatDistanceToNow = _interopRequireDefault(require("date-fns/formatDistanceToNow")); | ||
var _formatDistanceToNowStrict = _interopRequireDefault(require("date-fns/formatDistanceToNowStrict")); | ||
@@ -175,3 +175,3 @@ var _Base = _interopRequireDefault(require("./Base")); | ||
if (options.dateFormat === 'distance-to-now') { | ||
return (0, _formatDistanceToNow.default)(parsedDate, { | ||
return (0, _formatDistanceToNowStrict.default)(parsedDate, { | ||
addSuffix: true, | ||
@@ -178,0 +178,0 @@ locale: localeObject |
{ | ||
"name": "react-i18nify", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "Simple i18n translation and localization components and helpers for React.", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
@@ -6,3 +6,3 @@ /* eslint global-require: "off" */ | ||
import format from 'date-fns/format'; | ||
import formatDistanceToNow from 'date-fns/formatDistanceToNow'; | ||
import formatDistanceToNowStrict from 'date-fns/formatDistanceToNowStrict'; | ||
import BaseComponent from './Base'; | ||
@@ -123,3 +123,3 @@ import { fetchTranslation, replace } from './utils'; | ||
if (options.dateFormat === 'distance-to-now') { | ||
return formatDistanceToNow( | ||
return formatDistanceToNowStrict( | ||
parsedDate, | ||
@@ -126,0 +126,0 @@ { addSuffix: true, locale: localeObject }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56590