What to do if endDate and PurchaseDate are same?

While calculating the number_of_years I am calculating the total Days.In this case the days should be zero or equal to one? and I have checked that my
TiingoCandle[] arr=restTemplate.getForObject(url,TiingoCandle.class) is not returning null in this case.

In this case the days should be considered as 1

1 Like