Does anyone else have this problem?
Sounds like it's just a bit of a flaw in how it's calculated.
Consider this sequence of stops in your trip:
01 Dec 2010 - 06 Dec 2010
06 Dec 2010 - 10 Dec 2010
11 Dec 2010 - 14 Dec 2010
There's four ways to calculate that.
1. Use the first stop and last stop only and ignore all others. 13 days.
2. Use the first stop and last stop only and ignore all others. Include the first day as well. 14 days.
3. Sum up all the stop days. 5 + 4 + 3 = 12 days
4. Sum up stops, but include the departure day in calculations. 6 + 5 + 4 = 15 days.
I'd have to check the code, but I'm pretty sure I'm using method no.3, which would explain how it could drop a few days.
Considering this issue, probably method 1 is actually the better option, but then we need to be sure that the first and last stops always have a date. Or just take the difference between the earliest and latest dates?
I'll add this as a task to resolve, since it's clear that the method used now is not really the best
0 Response to "Statistic dates problem"
Post a Comment