iptdevs-design-system 3.1.379 → 3.1.380

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.
@@ -4002,7 +4002,7 @@ class CalculateQuotesService {
4002
4002
  dataFinancing.push(quota);
4003
4003
  while (index < params.quotaTimes) {
4004
4004
  index = index + 1;
4005
- let newJsDate = this.setPlusOneMonth(dateJs, isEndMonth);
4005
+ let newJsDate = this.setPlusOneMonth2(dateJs, isEndMonth);
4006
4006
  let row = [
4007
4007
  index,
4008
4008
  Intl.NumberFormat('en-US', {
@@ -4018,16 +4018,28 @@ class CalculateQuotesService {
4018
4018
  }
4019
4019
  return dataFinancing;
4020
4020
  }
4021
- setPlusOneMonth(originDate, isEndMonth) {
4021
+ // setPlusOneMonth(originDate: Date, isEndMonth: boolean): Date[] {
4022
+ // let response: Date [] = [];
4023
+ // let oneDayMilis = 1000 * 3600 * 24;
4024
+ // let day = isEndMonth ? this.monthsDays[(originDate.getMonth() + 1)%12]: originDate.getDate();
4025
+ // let plusMonthDate: Date = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
4026
+ // response.push(new Date(originDate.getFullYear(), originDate.getMonth() + 1, day));
4027
+ // while(plusMonthDate.getDay() === 0) {
4028
+ // plusMonthDate.setMilliseconds(originDate.getMilliseconds() - oneDayMilis);
4029
+ // }
4030
+ // response.push(plusMonthDate);
4031
+ // return response;
4032
+ // }
4033
+ setPlusOneMonth2(originDate, isEndMonth) {
4022
4034
  let response = [];
4023
4035
  let oneDayMilis = 1000 * 3600 * 24;
4024
4036
  let day = isEndMonth ? this.monthsDays[(originDate.getMonth() + 1) % 12] : originDate.getDate();
4025
4037
  let plusMonthDate = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
4026
- response.push(new Date(originDate.getFullYear(), originDate.getMonth() + 1, day));
4027
4038
  while (plusMonthDate.getDay() === 0) {
4028
- plusMonthDate.setMilliseconds(originDate.getMilliseconds() - oneDayMilis);
4039
+ plusMonthDate.setMilliseconds(plusMonthDate.getMilliseconds() - oneDayMilis);
4029
4040
  }
4030
4041
  response.push(plusMonthDate);
4042
+ response.push(new Date(originDate.getFullYear(), originDate.getMonth() + 1, day + 1));
4031
4043
  return response;
4032
4044
  }
4033
4045
  getStringDate(originDate) {