lib/generator/measure_period.js.erb in hqmf2js-1.1.0 vs lib/generator/measure_period.js.erb in hqmf2js-1.2.0
- old
+ new
@@ -11,8 +11,9 @@
}
)];
}
if (typeof effective_date === 'number') {
MeasurePeriod.high.date = new Date(1000*effective_date);
- MeasurePeriod.low.date = new Date(1000*effective_date);
+ // add one minute before pulling off the year. This turns 12-31-2012 23:59 into 1-1-2013 00:00 => 1-1-2012 00:00
+ MeasurePeriod.low.date = new Date(1000*(effective_date+60));
MeasurePeriod.low.date.setFullYear(MeasurePeriod.low.date.getFullYear()-1);
}