How come the number 2 suddenly becomes 2.5 in the next part of the expression?

Why doesn’t 2 + 1 = 3?

Anywho, I’m trying to build this expression:

(total number of log entries) / (number of days between today and oldest log entry) to get a number of logs per day metric.

A weirdness about dates is that if you’ve logged one time per day for three days, the math works out to 3/2 because today minus two days ago is two days, not three days.

5 on 30th

7 on 29th

9 on 28th

(total = 3) / (30-28 = 2) instead of (total = 3) / (3 days)

so I figured I’d just add 1 to the number of days calculation