lease-term-calculator 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DateCalculator.js +3 -0
- package/package.json +1 -1
package/dist/DateCalculator.js
CHANGED
|
@@ -78,6 +78,9 @@ class DateCalculator {
|
|
|
78
78
|
let years = 0;
|
|
79
79
|
let days = 0;
|
|
80
80
|
let daysInPartialYear = 0;
|
|
81
|
+
if (startDate < effectiveDate) {
|
|
82
|
+
start = effectiveDate;
|
|
83
|
+
}
|
|
81
84
|
const addYearAndGetEndDate = (date, yearsToAdd) => {
|
|
82
85
|
const newDate = new Date(date.getFullYear() + yearsToAdd, date.getMonth(), date.getDate());
|
|
83
86
|
newDate.setDate(newDate.getDate() - 1);
|
package/package.json
CHANGED