node-red-contrib-sun-position
Advanced tools
Comparing version 0.1.8 to 0.1.11
@@ -0,0 +0,0 @@ module.exports = { |
@@ -6,3 +6,3 @@ /******************************************** | ||
const sunCalc = require('suncalc'); | ||
//const sunCalc = require('suncalc2'); | ||
@@ -23,7 +23,7 @@ module.exports = { | ||
/*******************************************************************************************************/ | ||
Date.prototype.addDays = function (days) { | ||
/* Date.prototype.addDays = function (days) { | ||
var date = new Date(this.valueOf()); | ||
date.setUTCDate(date.getUTCDate() + days); | ||
return date; | ||
} | ||
} */ | ||
@@ -114,3 +114,4 @@ /*******************************************************************************************************/ | ||
if (d.getTime() <= cmp) { | ||
d = d.addDays(Number(next)); | ||
d.setDate(d.getDate() + Number(next)); | ||
//d = d.addDays(Number(next)); | ||
} | ||
@@ -125,7 +126,7 @@ } | ||
if ((daystart + dayx) > 6) { | ||
daypos = (daystart * -1) + dayx - 1; | ||
} else { | ||
daypos = daystart + dayx; | ||
daystart = (dayx * -1); | ||
} | ||
if (dayx > 6) { | ||
daypos = daystart + dayx; | ||
if (dayx > 7) { | ||
dayx = -1; | ||
@@ -136,3 +137,4 @@ break; | ||
if (dayx > 0) { | ||
d = d.addDays(dayx); | ||
d.setDate(d.getDate() + dayx); | ||
//d = d.addDays(dayx); | ||
} | ||
@@ -154,3 +156,4 @@ } | ||
if (d.getTime() <= cmp) { | ||
d = d.addDays(Number(next)); | ||
d.setUTCDate(d.getUTCDate() + Number(next)); | ||
//d = d.addDays(Number(next)); | ||
} | ||
@@ -165,7 +168,7 @@ } | ||
if ((daystart + dayx) > 6) { | ||
daypos = (daystart * -1) + dayx - 1; | ||
} else { | ||
daypos = daystart + dayx; | ||
daystart = (dayx * -1); | ||
} | ||
if (dayx > 6) { | ||
daypos = daystart + dayx; | ||
if (dayx > 7) { | ||
dayx = -1; | ||
@@ -176,3 +179,4 @@ break; | ||
if (dayx > 0) { | ||
d = d.addDays(dayx); | ||
d.setUTCDate(d.getUTCDate() + dayx); | ||
//d = d.addDays(dayx); | ||
} | ||
@@ -179,0 +183,0 @@ } |
@@ -6,3 +6,3 @@ /******************************************** | ||
const sunCalc = require('suncalc'); | ||
const sunCalc = require('suncalc2'); | ||
const path = require('path'); | ||
@@ -9,0 +9,0 @@ const hlp = require(path.join(__dirname, '/lib/sunPosHelper.js')); |
{ | ||
"name": "node-red-contrib-sun-position", | ||
"version": "0.1.8", | ||
"version": "0.1.11", | ||
"description": "NodeRED nodes to get sun and moon position", | ||
@@ -49,3 +49,3 @@ "main": "none", | ||
"dependencies": { | ||
"suncalc": "^1.8.0" | ||
"suncalc2": "^1.8.1" | ||
}, | ||
@@ -52,0 +52,0 @@ "node-red": { |
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
574349
2383
+ Addedsuncalc2@^1.8.1
+ Addedsuncalc2@1.8.1(transitive)
- Removedsuncalc@^1.8.0
- Removedsuncalc@1.9.0(transitive)