@felicienfrancois/cordova-plugin-stepper
Advanced tools
Comparing version 1.1.5 to 1.1.6
{ | ||
"name": "@felicienfrancois/cordova-plugin-stepper", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Lightweight pedometer Cordova/Phonegap plugin for Android using the hardware step sensor, with notifications.", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -50,3 +50,6 @@ var exec = require("cordova/exec"); | ||
exec((result) => { | ||
if (result && result.startDate && result.startDate < new Date().setHours(0,0,0,0)) { | ||
var now = new Date(); | ||
const hms = now.toLocaleString("en-UK", {timeZone: options.timeZone || undefined}).split(", ")[1].split(":"); | ||
startOfDay = new Date(now.getTime() - hms[0]*3600000 - hms[1]*60000 - hms[2]*1000); | ||
if (result && result.startDate && result.startDate < startOfDay) { | ||
this.stopStepperUpdates( | ||
@@ -53,0 +56,0 @@ false, |
66929
1115