I have to make some calculus based on two dates and the user says if it should calc the initial month or not.
My code is like this:
let qtMeses = getMonthDifference( dateaq!, d2: datebase! )
if ( proprioMesSwitch.on ){
let qtMeses = qtMeses + 1
}
The routine count how many month between the two dates and check to see if the user checked the initial month option.
Say the qtMeses variable has a value of 20 after calling the getMonthDifference procedure. After it tests the proprioMesSwitch and executes the let qtMeses = qtMeses + 1 line but even though the result after that is still the same 20.