$ \text{ms}_{\text{perDay}} = 1000 \times 60 \times 60 \times 24 $ $ \text{Time}_{\text{diff}} = \text{EndDate}_{\text{ms}} - \text{StartDate}_{\text{ms}} $ $ \text{TotalDays} = \text{round}( \frac{\text{Time}_{\text{diff}}}{\text{ms}_{\text{perDay}}} ) $
$ \text{TotalDays}_{\text{inclusive}} = \text{TotalDays} + 1 $