News for hackers. Stuff that matters.
Re:Kagi and Wolfram by qwertox on Tuesday March 05, 2024 @03:13PM (#39608630)
Wolfram Alpha still has the same old bug:

https://www.wolframalpha.com/input?i=2016-04-04+to+2019-01-3... = 2 years 9 months 27 days

https://www.wolframalpha.com/input?i=2019-01-31+to+2016-04-0... = 2 years 9 months 26 days

The duration should be identical but is off by one day.

One day a space mission will fail due to this bug.

Reported several times, they never cared.

Re:Kagi and Wolfram by EntropicBrew on Tuesday March 05, 2024 @04:24PM (#39609324)
This is fascinating. Even sillier example, https://www.wolframalpha.com/input?i=2019-01-31+to+2016-04-0... and https://www.wolframalpha.com/input?i=2019-01-30+to+2016-04-0...

both show an identical duration of 2 years 9 months 26 days (edit: despite reporting 1032 and 1031 days respectively).

Re:Kagi and Wolfram by pizzafeelsright on Tuesday March 05, 2024 @05:00PM (#39609651)
Counting months and days are two very different metrics.

Months are lunar. Days are solar.

Re:Kagi and Wolfram by EntropicBrew on Tuesday March 05, 2024 @05:17PM (#39609870)
Depends on the calendar system, as far as this discussion goes, the Greogorian calendar system is solar even for months.
Re:Kagi and Wolfram by timthelion on Tuesday March 05, 2024 @03:59PM (#39609101)
Is that a bug? I interpret it as from midnight 2016-04-04 to the first time which has the date 2019-01-31. That includes the full day of 2016-04-04 but nothing from 2019-01-31. This is contrasted with the opposite direction which is midnight 2019-01-31 going backwards, thus not including 2019-01-31 and all the way up till the first time which is 2016-04-04 non-inclusive.

Date time arithmetic is weird ;)

Re:Kagi and Wolfram by qwertox on Tuesday March 05, 2024 @04:09PM (#39609181)
If that were true, then this would be false:

https://www.wolframalpha.com/input?i=2019-01-31+to+2015-10-2... = 3 years 3 months 10 days

https://www.wolframalpha.com/input?i=2015-10-21+to+2019-01-3... = 3 years 3 months 10 days

Re:Kagi and Wolfram by timthelion on Tuesday March 05, 2024 @04:01PM (#39609120)
OK, I see, but it shows a different value for the absolute number of days, that's weird.
Re:Kagi and Wolfram by nuancebydefault on Tuesday March 05, 2024 @03:58PM (#39609095)
Both show 1032 days. Do space missions depend on such fuzzy defined time stamps as (calendar?) months? I think time dilation would be a much more serious factor.
Re:Kagi and Wolfram by derjames on Tuesday March 05, 2024 @06:30PM (#39610436)
If you use "from" in the second example, the answer is the same as in the first ... anyway the system should figure it out.
Re:Kagi and Wolfram by EntropicBrew on Wednesday March 06, 2024 @01:34AM (#39612965)
Do you still have any of the reports open? I might have some debug info. This appears to be an error with consecutive months with 31 days.

Jan 2024 - Nov 2023 example (both cases show "2 months 1 day"):

https://www.wolframalpha.com/input?i=2024-01-31+to+2023-11-2...

https://www.wolframalpha.com/input?i=2024-01-30+to+2023-11-2...

Aug 2024 - Jun 2024 example (same bug):

https://www.wolframalpha.com/input?i=2024-08-31+to+2024-06-2...

https://www.wolframalpha.com/input?i=2024-08-30+to+2024-06-2...

The same thing doesn't happen from Jul 2024 - May 2024 (results vary by 1 day):

https://www.wolframalpha.com/input?i=2024-07-31+to+2024-05-2...

https://www.wolframalpha.com/input?i=2024-07-30+to+2024-05-2...