Comparing version 2.3.0 to 2.3.1
{ | ||
"name": "luxon", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Immutable date wrapper", | ||
@@ -17,3 +17,3 @@ "author": "Isaac Cambron", | ||
"test": "jest --coverage", | ||
"api-docs": "mkdir -p build && documentation build src/luxon.js -f html -o build/api-docs", | ||
"api-docs": "mkdir -p build && documentation build src/luxon.js -f html -o build/api-docs && sed -i.bak 's/<\\/body>/<script src=\"\\/global\\/luxon.js\"><\\/script><script>console.log(\"You can try Luxon right here using the `luxon` global, like `luxon.DateTime.now()`\");<\\/script><\\/body>/g' build/api-docs/index.html && rm build/api-docs/index.html.bak", | ||
"copy-site": "mkdir -p build && rsync -a docs/ build/docs && rsync -a site/ build", | ||
@@ -20,0 +20,0 @@ "site": "npm run api-docs && npm run copy-site", |
@@ -769,3 +769,3 @@ import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from "./errors.js"; | ||
for (const k of Object.keys(this.values)) { | ||
negated[k] = -this.values[k]; | ||
negated[k] = this.values[k] === 0 ? 0 : -this.values[k]; | ||
} | ||
@@ -772,0 +772,0 @@ return clone(this, { values: negated }, true); |
@@ -22,4 +22,3 @@ /** | ||
else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance; | ||
else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input); | ||
else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input); | ||
else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); | ||
} else if (isNumber(input)) { | ||
@@ -26,0 +25,0 @@ return FixedOffsetZone.instance(input); |
@@ -30,3 +30,3 @@ import DateTime from "./datetime.js"; | ||
static isValidIANAZone(zone) { | ||
return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone); | ||
return IANAZone.isValidZone(zone); | ||
} | ||
@@ -33,0 +33,0 @@ |
@@ -12,3 +12,3 @@ import DateTime from "./datetime.js"; | ||
const VERSION = "2.3.0"; | ||
const VERSION = "2.3.1"; | ||
@@ -15,0 +15,0 @@ export { |
@@ -83,8 +83,8 @@ import { formatOffset, parseZoneInfo, isUndefined, ianaRegex, objToLocalTS } from "../impl/util.js"; | ||
* @example IANAZone.isValidSpecifier("America/New_York") //=> true | ||
* @example IANAZone.isValidSpecifier("Fantasia/Castle") //=> true | ||
* @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false | ||
* @deprecated This method returns false some valid IANA names. Use isValidZone instead | ||
* @return {boolean} | ||
*/ | ||
static isValidSpecifier(s) { | ||
return !!(s && s.match(matchingRegex)); | ||
return this.isValidZone(s); | ||
} | ||
@@ -91,0 +91,0 @@ |
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
Sorry, the diff of this file is too big to display
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
3722375
40791