@shopify/dates
Advanced tools
Comparing version 0.4.1 to 1.0.0-sknext-beta.1
{ | ||
"name": "@shopify/dates", | ||
"version": "0.4.1", | ||
"version": "1.0.0-sknext-beta.1", | ||
"license": "MIT", | ||
"description": "Lightweight date operations library", | ||
"main": "dist/src/index.js", | ||
"types": "dist/src/index.d.ts", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
@@ -27,12 +27,26 @@ "build": "tsc --p tsconfig.json" | ||
"dependencies": { | ||
"@shopify/decorators": "^1.1.12", | ||
"@shopify/decorators": "1.0.0-sknext-beta.1", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"@shopify/jest-dom-mocks": "^2.9.1" | ||
"@shopify/jest-dom-mocks": "1.0.0-sknext-beta.1" | ||
}, | ||
"files": [ | ||
"dist/*", | ||
"!tsconfig.tsbuildinfo" | ||
] | ||
"build/*", | ||
"!tsconfig.tsbuildinfo", | ||
"index.js", | ||
"index.mjs", | ||
"index.esnext", | ||
"index.d.ts" | ||
], | ||
"module": "index.mjs", | ||
"esnext": "index.esnext", | ||
"exports": { | ||
"./": "./", | ||
".": { | ||
"import": "./index.mjs", | ||
"require": "./index.js", | ||
"esnext": "./index.esnext" | ||
} | ||
} | ||
} |
@@ -21,3 +21,3 @@ # `@shopify/dates` | ||
Takes in a date object and two optional time zone string parameters. Returns a new date object with the offset between the time zones added to it. | ||
Takes in a date object and two optional time zone string parameters. Returns a new date object with the offset between the time zones added to it. We can also assume the passed date is in the first time zone and we want to calculate it in the second time zone. | ||
@@ -31,3 +31,3 @@ ```ts | ||
const newDate = applyTimeZoneOffset(date, timeZone1, timeZone2); | ||
const newDate = applyTimeZoneOffset(date, timeZone1, timeZone2); //'2018-06-01T02:00:00.000Z' | ||
``` | ||
@@ -329,3 +329,3 @@ | ||
Takes in a date object and two optional time zone string parameters. Returns a new date object with the offset between the time zones subtracted from it. | ||
Takes in a date object and two optional time zone string parameters. Returns a new date object with the offset between the time zones subtracted from it. We can also assume the passed date is in the second time zone and we want to calculate it back in the first time zone. | ||
@@ -336,5 +336,6 @@ ```ts | ||
const date = new Date('2018-06-01Z14:00'); | ||
const timeZone = 'Australia/Perth'; | ||
const timeZone1 = 'Australia/Perth'; | ||
const timeZone2 = 'America/Toronto'; | ||
const newDate = unapplyTimeZoneOffset(date, offset); | ||
const newDate = unapplyTimeZoneOffset(date, timeZone1, timeZone2); //2018-06-02T02:00:00.000Z | ||
``` |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
194918
217
3491
338
1
+ Added@shopify/decorators@1.0.0-sknext-beta.1(transitive)
+ Added@shopify/function-enhancers@1.0.0-sknext-beta.1(transitive)
- Removed@shopify/decorators@1.2.5(transitive)
- Removed@shopify/function-enhancers@1.1.5(transitive)