+5
-0
@@ -0,1 +1,6 @@ | ||
| ## 0.2.0 (2021-11-28) | ||
| * Better handling of timezones when processing input dates. Now '2022-01-01' means what it should, no matter your timezone. | ||
| * Update dependencies and introduce `package-lock.json` | ||
| ## 0.1.2 (2014-11-21) | ||
@@ -2,0 +7,0 @@ |
+6
-14
| { | ||
| "name": "suncsv", | ||
| "version": "0.1.2", | ||
| "version": "0.2.0", | ||
| "main": "src/server/util.js", | ||
@@ -9,19 +9,12 @@ "bin": { | ||
| "preferGlobal": true, | ||
| "dependencies": { | ||
| "commander": "2.3.0", | ||
| "duration": "^0.2.0", | ||
| "moment": "^2.8.3", | ||
| "suncalc": "1.5.2", | ||
| "zippity-do-dah": "0.0.2" | ||
| "commander": "8.3.0", | ||
| "duration": "0.2.2", | ||
| "moment": "2.29.1", | ||
| "suncalc": "1.8.0", | ||
| "zippity-do-dah": "0.0.3" | ||
| }, | ||
| "devDependencies": { | ||
| "grunt": "0.4.5", | ||
| "thehelp-project": "3.3.1" | ||
| }, | ||
| "scripts": { | ||
| "test": "grunt" | ||
| }, | ||
| "description": "Generates sunrise and sunset calendar items in CSV form for import to your favorite calendar program.", | ||
@@ -34,3 +27,2 @@ "keywords": [ | ||
| ], | ||
| "author": "Scott Nonnenberg <scott@nonnenberg.com>", | ||
@@ -37,0 +29,0 @@ "license": "MIT", |
+1
-11
@@ -24,3 +24,3 @@ # suncsv | ||
| ```bash | ||
| suncsv -z YOURZIP --begin '1/1/2015' --end '12/31/2015' > events.csv | ||
| suncsv -z YOURZIP --begin '2015-01-01' --end '2015-12-31' > events.csv | ||
| ``` | ||
@@ -47,12 +47,2 @@ | ||
| ## Some thoughts on next steps: | ||
| * Generate it in a more friendly way for spreadsheets | ||
| * sunrise and sunset on the same row | ||
| * complete times included along with separated date and time | ||
| * Add some stuff for equinoxes/solstices/more? http://www.archaeoastronomy.com/2014.html | ||
| * We don't always honor start/end dates perfectly if generating events for another timezone | ||
| ## License | ||
@@ -59,0 +49,0 @@ |
+12
-11
@@ -33,2 +33,9 @@ 'use strict'; | ||
| // Okay, here we go... | ||
| var today = new Date(); | ||
| startup(today); | ||
| const options = commander.opts(); | ||
| var processDay = function processDay(day, gps) { | ||
@@ -42,3 +49,3 @@ // Thanks, `suncalc` for your awesomeness | ||
| if (commander.sunrise) { | ||
| if (options.sunrise) { | ||
| item = util.createItem('Sunrise', times.sunrise, daylight); | ||
@@ -48,3 +55,3 @@ console.log(item); | ||
| if (commander.sunset) { | ||
| if (options.sunset) { | ||
| item = util.createItem('Sunset', times.sunset, daylight); | ||
@@ -55,12 +62,6 @@ console.log(item); | ||
| // Okay, here we go... | ||
| var today = new Date(); | ||
| startup(today); | ||
| // Prepare working variables | ||
| var gps = zip.zipcode(commander.zip); | ||
| var day = util.normalizeDate(commander.begin, today); | ||
| var end = util.normalizeDate(commander.end, today); | ||
| var gps = zip.zipcode(options.zip); | ||
| var day = util.normalizeDate(options.begin, today); | ||
| var end = util.normalizeDate(options.end, today); | ||
@@ -67,0 +68,0 @@ // Write out the CSV header |
@@ -14,3 +14,3 @@ | ||
| exports.makeDate = function makeDate(date) { | ||
| return new Date(date); | ||
| return moment(date).toDate(); | ||
| }; | ||
@@ -17,0 +17,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
0
-100%121
0.83%8894
-2.44%70
-12.5%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated
Updated