Menu

Bug Fixed, Build Updated

I finally looked at the off by one day bug for year 0 Jan and Feb
and believe I have that fixed.

Also, I attempted to update the build system to use more
of the gnu build system. It now uses libtool to create a library
so these conversion functions can be used by other
application. However, in so doing I now find that the
build is broken on Solaris. make issues an unusual
error about macro expansion problems.

And in fixing the off by one day bug, I have added
a RunTests script that runs through some test
dates. In so doing, I found subtle off by .000001
round off problems when converting dates
back and forth with jday and j2d. They should
be mirrors of each other and be able to reproduce
each other's dates.

There is an interent problem because the
resolution of each tool is different. j2d resolves
a date to the second. jday resolves a date
to 0.000001 day which is only 0.0864 seconds

But even so, given the output of jday, certainly
j2d should be able to reproduce the date that
jday worked on.

The error was found while checking 1582 boundary
conditions:

./jday -d 1582/10/04 23:59:59 -> 2299160.499988
./j2d 2299160.499988 -> 1582/10/04 23:59:58

Note j2d produces 23:59:58 instead of 23:59:59

I would imagine this may happen elsewhere too.

Posted by Hiram Clawson 2002-06-10

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.