fifth-postulate / julian

Date and time library for Prolog
The Unlicense
27 stars 3 forks source link

No October 30, 2166 #11

Open langelgjm opened 5 years ago

langelgjm commented 5 years ago

When trying to solve a logic puzzle, I ran across the following issue - October 30, 2166 seems not to exist!

?- form_time(gregorian(2166, 10, 29)).
true.

?- form_time(gregorian(2166, 10, 30)).
false.

?- form_time(gregorian(2166, 10, 31)).
true.

However, the following works:

?- gregorian(2166, 10, 30).
Correct to: "julian_calendar_gregorian:gregorian(2166,10,30)"? yes
true.

Version: SWI-Prolog (threaded, 64 bits, version 8.0.1)

mndrix commented 5 years ago

Good catch, and thanks for the report.

I'm not currently using julian or Prolog, so I probably won't get around to debugging this myself. Sorry. I'll leave the issue open in case anyone else is interested in tracking down a fix.