ambit
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -52,7 +52,7 @@ 'use strict'; | ||
hms = Moonbeams.dayToHms(cal.day); | ||
end = Moment(new Date(cal.year, cal.month - 1, cal.day, hms.hour, hms.minute, hms.second)); | ||
end = Moment(new Date(cal.year, cal.month - 1, Math.floor(cal.day), hms.hour, hms.minute, hms.second)); | ||
if (guessYear && end <= now) { | ||
cal = Moonbeams.jdToCalendar(Moonbeams.season(endSeason, endYear + 1)); | ||
hms = Moonbeams.dayToHms(cal.day); | ||
end = Moment(new Date(cal.year, cal.month - 1, cal.day, hms.hour, hms.minute, hms.second)); | ||
end = Moment(new Date(cal.year, cal.month - 1, Math.floor(cal.day), hms.hour, hms.minute, hms.second)); | ||
year = year + 1; | ||
@@ -62,3 +62,3 @@ } | ||
hms = Moonbeams.dayToHms(cal.day); | ||
start = Moment(new Date(cal.year, cal.month - 1, cal.day, hms.hour, hms.minute, hms.second)); | ||
start = Moment(new Date(cal.year, cal.month - 1, Math.floor(cal.day), hms.hour, hms.minute, hms.second)); | ||
end.subtract(1, 'seconds'); | ||
@@ -65,0 +65,0 @@ return { |
{ | ||
"name": "ambit", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Date parser that returns a range instead of a single value", | ||
@@ -19,3 +19,3 @@ "author": "Michael Garvin <gar@comrade.us>", | ||
"git-validate": "^2.1.4", | ||
"lab": "^10.0.0" | ||
"lab": "^11.0.0" | ||
}, | ||
@@ -22,0 +22,0 @@ "homepage": "https://github.com/wraithgar/ambit", |
9663
6