I will have to agree that this is a bug. The first one counts 2014-01-01 to 2014-01-02 as TWO, the second one as ONE. Ie, they are calculating the difference inclusive or exclusive one of the dates.
We have corrected this in our development environment and a patch will go live within a week.