-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The time:verify-date function in LIBLSP; TIME (LIBDOC; TIME >) is broken #716
Comments
I couldn't follow the algorithm used in to compute the DOW. I see different algorithms on the 'net. Perhaps we should just rewrite this function to use a known-good algorithm that works correctly for both dates in the past and current dates. |
This isn't (exactly) a Y2K issue; it's a leap year rule issue. At present,
With the (There's a comment saying |
Thanks! I’ll fix. And yes, my next commit will include DOW, which I will. Also fix. |
Even with the above fix, this code still is wrong:
5 = Saturday (according to this package). But that day is a Sunday. |
Weird - this modified code returns the right value for me:
There isn't a compiled version of the original code sitting around somewhere, or something like that? |
Can you make available your version of TIME LISP so that I can compare with the version in DB, which is in LIBDOC; TIME >? |
I haven't changed LIBDOC; TIME > at all - when I was debugging it, I copied just that function to another file (attached to the previous comment) and modified it there. On my ITS system, I've just checked that LIBDOC; is the same as current master, i.e. there's TIME KMP8 without your fix and TIME KMP9 with it. The latter seems to work if I load it explicitly:
|
Interesting! Does that suggest that since DB has both kmp8 and kmp9 that the wrong one is getting compiled? I wonder if there is an explicit reference to kmp8 version in the lisp.tcl file. |
I checked. And there is. I’ll fix. |
See #1081 |
Resolved by #1092 |
The time:verify-date function, among other things, verifies that the supplied day of the week (DOW) matches the computed one for a given date. If is not working correctly now (Y2K issue?).
This function is used in time:print-date and because of the above failure, time:print-date raises an error. time:print-date is used in some of the Macsyma tools.
I commented out the check in time:print-date in LIBDOC; TIME KMP8 (the original was TIME KMP7). This ticket serves as a reminder to fix time:verify-date and then reenable the check in time:print-date.
The text was updated successfully, but these errors were encountered: