Comparing version 3.2.0 to 3.2.1
{ | ||
"name": "luxon", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Immutable date wrapper", | ||
@@ -5,0 +5,0 @@ "author": "Isaac Cambron", |
@@ -73,2 +73,10 @@ import { padStart, roundTo, hasRelative } from "./util.js"; | ||
// private subtags and unicode subtags have ordering requirements, | ||
// and we're not properly parsing this, so just strip out the | ||
// private ones if they exist. | ||
const xIndex = localeStr.indexOf("-x-"); | ||
if (xIndex !== -1) { | ||
localeStr = localeStr.substring(0, xIndex); | ||
} | ||
const uIndex = localeStr.indexOf("-u-"); | ||
@@ -79,12 +87,14 @@ if (uIndex === -1) { | ||
let options; | ||
const smaller = localeStr.substring(0, uIndex); | ||
let selectedStr; | ||
try { | ||
options = getCachedDTF(localeStr).resolvedOptions(); | ||
selectedStr = localeStr; | ||
} catch (e) { | ||
const smaller = localeStr.substring(0, uIndex); | ||
options = getCachedDTF(smaller).resolvedOptions(); | ||
selectedStr = smaller; | ||
} | ||
const { numberingSystem, calendar } = options; | ||
// return the smaller one so that we can append the calendar and numbering overrides to it | ||
return [smaller, numberingSystem, calendar]; | ||
return [selectedStr, numberingSystem, calendar]; | ||
} | ||
@@ -95,3 +105,5 @@ } | ||
if (outputCalendar || numberingSystem) { | ||
localeStr += "-u"; | ||
if (!localeStr.includes("-u-")) { | ||
localeStr += "-u"; | ||
} | ||
@@ -98,0 +110,0 @@ if (outputCalendar) { |
@@ -228,3 +228,3 @@ import { | ||
return s | ||
.replace(/\([^)]*\)|[\n\t]/g, " ") | ||
.replace(/\([^()]*\)|[\n\t]/g, " ") | ||
.replace(/(\s\s+)/g, " ") | ||
@@ -231,0 +231,0 @@ .trim(); |
@@ -12,3 +12,3 @@ import DateTime from "./datetime.js"; | ||
const VERSION = "3.2.0"; | ||
const VERSION = "3.2.1"; | ||
@@ -15,0 +15,0 @@ export { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
3991264
41733