@instructure/ui-i18n
Advanced tools
Comparing version 5.1.1 to 5.2.0-dev.1
@@ -25,3 +25,3 @@ /* | ||
import moment from 'moment'; | ||
import moment from 'moment-timezone'; | ||
import 'moment-timezone/builds/moment-timezone-with-data'; | ||
@@ -57,3 +57,4 @@ | ||
_checkParams(locale, timezone); | ||
return moment.tz(dateString, [moment.ISO_8601, 'l', 'L', 'll', 'LL'], locale, timezone); | ||
// list all available localized formats, from most specific to least | ||
return moment.tz(dateString, [moment.ISO_8601, 'llll', 'LLLL', 'lll', 'LLL', 'll', 'LL', 'l', 'L'], locale, timezone); | ||
} | ||
@@ -60,0 +61,0 @@ |
@@ -12,5 +12,5 @@ 'use strict'; | ||
var _moment = require('moment'); | ||
var _momentTimezone = require('moment-timezone'); | ||
var _moment2 = _interopRequireDefault(_moment); | ||
var _momentTimezone2 = _interopRequireDefault(_momentTimezone); | ||
@@ -61,3 +61,3 @@ require('moment-timezone/builds/moment-timezone-with-data'); | ||
_checkParams(locale, timezone); | ||
return (0, _moment2.default)().locale(locale).tz(timezone); | ||
return (0, _momentTimezone2.default)().locale(locale).tz(timezone); | ||
} | ||
@@ -74,3 +74,4 @@ | ||
_checkParams(locale, timezone); | ||
return _moment2.default.tz(dateString, [_moment2.default.ISO_8601, 'l', 'L', 'll', 'LL'], locale, timezone); | ||
// list all available localized formats, from most specific to least | ||
return _momentTimezone2.default.tz(dateString, [_momentTimezone2.default.ISO_8601, 'llll', 'LLLL', 'lll', 'LLL', 'll', 'LL', 'l', 'L'], locale, timezone); | ||
} | ||
@@ -84,3 +85,3 @@ | ||
function isValid(dateString) { | ||
return (0, _moment2.default)(dateString, [_moment2.default.ISO_8601]).isValid(); | ||
return (0, _momentTimezone2.default)(dateString, [_momentTimezone2.default.ISO_8601]).isValid(); | ||
} | ||
@@ -94,3 +95,3 @@ | ||
function browserTimeZone() { | ||
return _moment2.default.tz.guess(); | ||
return _momentTimezone2.default.tz.guess(); | ||
} | ||
@@ -97,0 +98,0 @@ |
{ | ||
"name": "@instructure/ui-i18n", | ||
"version": "5.1.1", | ||
"version": "5.2.0-dev.1", | ||
"description": "A UI component library made by Instructure Inc.", | ||
@@ -25,4 +25,4 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"devDependencies": { | ||
"@instructure/ui-presets": "^5.1.1", | ||
"@instructure/ui-themes": "^5.1.1", | ||
"@instructure/ui-presets": "^5.2.0-dev.1", | ||
"@instructure/ui-themes": "^5.2.0-dev.1", | ||
"react": "15.6.2", | ||
@@ -36,5 +36,4 @@ "react-dom": "15.6.2" | ||
"dependencies": { | ||
"@instructure/ui-utils": "^5.1.1", | ||
"@instructure/ui-utils": "^5.2.0-dev.1", | ||
"decimal.js": "^9.0.1", | ||
"moment": "^2.10.6", | ||
"moment-timezone": "^0.5.14", | ||
@@ -41,0 +40,0 @@ "prop-types": "^15.5.10" |
@@ -25,3 +25,3 @@ /* | ||
import moment from 'moment' | ||
import moment from 'moment-timezone' | ||
import 'moment-timezone/builds/moment-timezone-with-data' | ||
@@ -57,3 +57,4 @@ | ||
_checkParams(locale, timezone) | ||
return moment.tz(dateString, [moment.ISO_8601, 'l', 'L', 'll', 'LL'], locale, timezone) | ||
// list all available localized formats, from most specific to least | ||
return moment.tz(dateString, [moment.ISO_8601, 'llll', 'LLLL', 'lll', 'LLL', 'll', 'LL', 'l', 'L'], locale, timezone) | ||
} | ||
@@ -60,0 +61,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
78947
6
1625
1
1
- Removedmoment@^2.10.6