Comparing version 1.4.0 to 1.5.0
@@ -389,2 +389,17 @@ // == BDS2 LICENSE == | ||
/* | ||
* Get the UTC time for a timezone-naive timestamp and timezone | ||
* | ||
* @param {String} timezone-naive timestamp | ||
* | ||
* @param {String} timezone name | ||
* | ||
* @return {Integer} UTC time | ||
*/ | ||
getUTCFromLocalTimeAndTimezone: function(timestamp, timezone) { | ||
if (!timezone) { | ||
throw new Error('A timezone is required!'); | ||
} | ||
return moment.tz(timestamp, timezone).valueOf(); | ||
}, | ||
/* | ||
* Is this an ISO8601-formatted timestamp? | ||
@@ -391,0 +406,0 @@ * |
{ | ||
"name": "sundial", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Tidepool's datetime wrapper", | ||
@@ -40,3 +40,4 @@ "keywords": [ | ||
"scripts": { | ||
"test": "grunt test" | ||
"test": "grunt test", | ||
"browser-tests": "node_modules/.bin/testem" | ||
}, | ||
@@ -47,2 +48,3 @@ "dependencies": { | ||
"devDependencies": { | ||
"chai": "3.3.0", | ||
"grunt": "0.4.5", | ||
@@ -52,5 +54,7 @@ "grunt-cli": "0.1.13", | ||
"grunt-mocha-test": "0.12.7", | ||
"json-loader": "0.5.3", | ||
"mocha": "2.1.0", | ||
"salinity": "0.0.7" | ||
"testem": "0.9.7", | ||
"webpack": "1.12.2" | ||
} | ||
} |
@@ -37,1 +37,7 @@ Sundial datetime wrapper | ||
``` | ||
Run the tests in-browser locally with: | ||
```bash | ||
$ npm run browser-tests | ||
``` |
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
22726
506
43
9