@@ -1041,13 +1041,13 @@ const nonIsoHelperBase = {
10411041 case 'month' :
10421042 case 'year' : {
10431043 // Sign is -1 if calendarTwo < calendarOne, 1 if calendarTwo > calendarOne
1044- let sign = this . compareCalendarDates ( calendarTwo , calendarOne ) ;
1044+ const sign = this . compareCalendarDates ( calendarTwo , calendarOne ) ;
10451045 // If dates are equal, return 0 date duration
10461046 if ( ! sign ) {
10471047 return { years : 0 , months : 0 , weeks : 0 , days : 0 } ;
10481048 }
10491049 // Take the difference between the years of the two dates
1050- let diffYears = calendarTwo . year - calendarOne . year ;
1050+ const diffYears = calendarTwo . year - calendarOne . year ;
10511051 // Take the difference between the days of the two dates
10521052 const diffDays = calendarTwo . day - calendarOne . day ;
10531053 // Get list of additional months, and possibly cycle info
@@ -1062,7 +1062,7 @@ const nonIsoHelperBase = {
10621062 // then the years difference should be positive (or negative if sign < 0).
10631063 if ( calendarTwo . monthCode > calendarOne . monthCode ) diffInYearSign = 1 ;
10641064 // If calendarTwo's month is less than calendarOne's month,
1065- // then the years difference should be positive (or negative if sign < 0).
1065+ // then the years difference should be negative (or positive if sign < 0).
10661066 if ( calendarTwo . monthCode < calendarOne . monthCode ) diffInYearSign = - 1 ;
10671067 // If the two months are equal, the sign of the years difference should be
10681068 // the sign of the days difference.
@@ -1087,7 +1087,7 @@ const nonIsoHelperBase = {
10871087
10881088 // intermediate should be a date between calendarOne and calendarTwo,
10891089 // that is within a year of calendarTwo.
1090- let intermediate =
1090+ const intermediate =
10911091 years || months ? this . addCalendar ( calendarOne , { years, months } , 'constrain' , cache ) : calendarOne ;
10921092
10931093 // At this point, intermediate could fail to be in between calendarOne and calendarTwo
@@ -1120,7 +1120,7 @@ const nonIsoHelperBase = {
11201120
11211121 // This may return a duration like <P12M11D> that appears to have unbalanced months.
11221122 // But that's fine, because subtracting <P12M11D> from a date may have different
1123- // results than subtracting <P1Y11D> from the same date, in the presence of leap years .
1123+ // results than subtracting <P1Y11D> from the same date, in the presence of leap months .
11241124 break ;
11251125 }
11261126 }
0 commit comments