Closed vregdev closed 9 years ago
@vregdev 364 days is the accurate calculation done by the computer. http://www.wolframalpha.com/input/?i=how+many+days+from+01%2F01%2F2014+to+12%2F31%2F2014
365 days is the human estimation. I am afraid the only way to do so is through a workaround. You can calculate that
TimeDifference.between(start_time, end_time).in_years # returns 1 year
and map that 1 year = 365 days
When i use: TimeDifference.between(@from_date, @to_date).in_days
where @from_date = '01/01/2014' and @to_date = '12/31/2014', it computes the diff as 364 days.
Is there a way I can have the diff take into account the end-date as well, so that the result comes up as "365" instead of "364" ?