Year(s) Month(s) Day(s) between 2 dates
|
10-29-2015, 07:52 AM
Post: #35
|
|||
|
|||
RE: Year(s) Month(s) Day(s) between 2 dates
(10-28-2015 03:24 PM)fhub Wrote:(10-28-2015 12:11 PM)Didier Lachieze Wrote: ..., and the results are aligned with WolframAlpha:Yes, your new version behaves in fact exactly like WolframAlpha - look at the following 2 examples: Yes, it’s far from perfect. But the problem in calculating date intervals here is that we are dealing with a variable unit (a month can be 28, 29, 30 or 31 days long), so troubles occur at the boundaries. With your program there are also some discontinuities: 25.012015 to 28.022015 --> 1 month 3 days 25.012015 to 01.032015 --> 1 month 7 days (+4 days!) Adding one day to the end date increases the result by 4 days! 3 “phantom” days have been added between the 28 of February 2015 and the 1st of March 2015. And this depends also on the start month: 25.112014 to 28.022015 --> 3 month 3 days 25.112014 to 01.032015 --> 3 month 6 days (+3 days!) Here only 2 “phantom” days have been added between the 28 of February 2015 and the 1st of March 2015. All this is not very consistent and without a clear and agreed standard way of calculating date intervals the results are quite useless from my point of view. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)