Re: [fpc-devel] negative TDateTime values and MinDateTime
On Wed, Aug 3, 2011 at 5:07 PM, Hans-Peter Diettrich drdiettri...@aol.com wrote: There exist other calendars than only the Gregorian one, with their own oddities (Maya!), and all of them should be based on an common internal date/time type. I've never heard that our DateTime routines support other calendars. My guess is that they simply don't. -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
On 08/04/2011 09:58 AM, Felipe Monteiro de Carvalho wrote: I've never heard that our DateTime routines support other calendars. My guess is that they simply don't. Perhaps they should ! My favorite is the really natural one: Plank-time count since the Big Bang. Here supposedly we don't need negative values., -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
My favorite is the really natural one: Plank-time count since the Big Bang. Here supposedly we don't need negative values., Good joke! ;-))) (but nobody knows, when it was (how many mld. years ago) and many doubts, that it is real fact) -Laco. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
On 4 August 2011 09:58, Felipe Monteiro de Carvalho wrote: I've never heard that our DateTime routines support other calendars. My guess is that they simply don't. Even so, does that mean we can't write software with FPC for use by Historian's where they might catalog artifacts with a date less that Year 100? I haven't tested, but if so, that's terrible. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
On Wed, Aug 3, 2011 at 6:55 AM, LacaK la...@zoznam.sk wrote: So if this constant can not be changed, then I must write workaround for date '01/01/0001' and do not add time part to this date. The constant was already changed once, and no-one complained in the following years, so my guess is that it could be changed again or even eliminated. See: http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg07984.html -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
On Thu, Aug 4, 2011 at 10:11 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Even so, does that mean we can't write software with FPC for use by Historian's where they might catalog artifacts with a date less that Year 100? I haven't tested, but if so, that's terrible. You quoted my text in which I said that DateTime does not support other calendars, for example Maja. The limit of dates is not related to that. -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
In our previous episode, Felipe Monteiro de Carvalho said: [ Charset ISO-8859-1 unsupported, converting... ] On Wed, Aug 3, 2011 at 6:55 AM, LacaK la...@zoznam.sk wrote: So if this constant can not be changed, then I must write workaround for date '01/01/0001' and do not add time part to this date. The constant was already changed once, and no-one complained in the following years, so my guess is that it could be changed again or even eliminated. See: http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg07984.html I think sacrificing dates from the year 1 to 100 AD to keep old two digit databases working is a small price to pay. If the test doesn't take this into account, the test is simply wrong. Maybe the difference between datetime and time or datetime-difference must be strengthened. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
Felipe Monteiro de Carvalho wrote / napísal(a): On Wed, Aug 3, 2011 at 6:55 AM, LacaK la...@zoznam.sk wrote: So if this constant can not be changed, then I must write workaround for date '01/01/0001' and do not add time part to this date. The constant was already changed once, and no-one complained in the following years, so my guess is that it could be changed again I think so also. But my hotfix for this moment is skip testing datetimes '0001-01-01' with time portion. As you can view here http://bugs.freepascal.org/view.php?id=19878 in toolsunit.diff SQL standard ofcourse allows datetimes from '0001-01-01 00:00:00' to '0001-01-01 23:59:59' -Laco. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
On Thu, Aug 4, 2011 at 1:53 PM, Marco van de Voort mar...@stack.nl wrote: I think sacrificing dates from the year 1 to 100 AD to keep old two digit databases working is a small price to pay. But if I understand the situation correctly, dates 1 to 100AD are already supported in FPC and no-one complayned about old databases in the last years since the change made by Joost. Lacak only asked to add 1 more day to our date limit. -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
Felipe Monteiro de Carvalho wrote / napísal(a): On Thu, Aug 4, 2011 at 1:53 PM, Marco van de Voort mar...@stack.nl wrote: I think sacrificing dates from the year 1 to 100 AD to keep old two digit databases working is a small price to pay. But if I understand the situation correctly, dates 1 to 100AD are already supported in FPC and no-one complayned about old databases in the last years since the change made by Joost. Lacak only asked to add 1 more day to our date limit. Exactly so! And MinDateTime is used only in these two conversions functions (to test if result value is MinDateTime): FloatToDateTime and VariantToDate -Laco. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
Graeme Geldenhuys schrieb: On 4 August 2011 09:58, Felipe Monteiro de Carvalho wrote: I've never heard that our DateTime routines support other calendars. My guess is that they simply don't. Even so, does that mean we can't write software with FPC for use by Historian's where they might catalog artifacts with a date less that Year 100? I haven't tested, but if so, that's terrible. +1 DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
Michael Schnell schrieb: Even so, does that mean we can't write software with FPC for use by Historian's where they might catalog artifacts with a date less that Year 100? I haven't tested, but if so, that's terrible. Hmm . What week-day and what month was day 1.000.000 BC ? The date representation by floating point numbers has a big advantage here: far away dates loose accuracy, so that it will be impossible to specify a time, or even specific days in such a date :-) Did the Dinosaurs work that day even if it was a Sunday ? We may end up with an answer like 42 (+- some billion years) for the date of the big bang, due to that inaccuracy. Isn't it nice how IT denies more concrete calculations, and consequently is neutral in disputes about the origin of the universe? ;-) DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
Am 04.08.2011 10:11, schrieb Graeme Geldenhuys: On 4 August 2011 09:58, Felipe Monteiro de Carvalho wrote: I've never heard that our DateTime routines support other calendars. My guess is that they simply don't. Even so, does that mean we can't write software with FPC for use by Historian's where they might catalog artifacts with a date less that Year 100? I haven't tested, but if so, that's terrible. People needing this should use specialized libraries which support this. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
On 08/03/2011 06:55 AM, LacaK wrote: Jonas Maebe wrote / napísal(a): On 02 Aug 2011, at 13:45, LacaK wrote: What do you think, can we change MinDateTime from -693593.0 to -693594.0; (to accept 01/01/0001 23:59:59.999) Negative dates are problematic as Year 0 officially does not exist. the first day of Year 1 is directly preceded by the last day of year 1 BC. Many years ago I wrote a set of date handling functions for Jedi. Those became obsolete when a newer Delphi VCL version included a much improved set of date function. Maybe some of my old stuff (e.g. handling of negative dates) might still be of some interest. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
Michael Schnell schrieb: On 08/03/2011 06:55 AM, LacaK wrote: Jonas Maebe wrote / napísal(a): On 02 Aug 2011, at 13:45, LacaK wrote: What do you think, can we change MinDateTime from -693593.0 to -693594.0; (to accept 01/01/0001 23:59:59.999) Negative dates are problematic as Year 0 officially does not exist. the first day of Year 1 is directly preceded by the last day of year 1 BC. There exist other calendars than only the Gregorian one, with their own oddities (Maya!), and all of them should be based on an common internal date/time type. IMO a MinDateTime value should be private to every calendar, if ever needed, and the global constant should be removed. DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
LacaK schrieb: Exception is raised because v2MinDateTime { 01/01/0001 12:00:00.000 AM }. But logicaly on timeline is v2 after v1. What do you think, can we change MinDateTime from -693593.0 to -693594.0; (to accept 01/01/0001 23:59:59.999) What's the rationale for a restriction at all? DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
On 02 Aug 2011, at 13:45, LacaK wrote: What do you think, can we change MinDateTime from -693593.0 to -693594.0; (to accept 01/01/0001 23:59:59.999) http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg07989.html Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] negative TDateTime values and MinDateTime
Jonas Maebe wrote / napísal(a): On 02 Aug 2011, at 13:45, LacaK wrote: What do you think, can we change MinDateTime from -693593.0 to -693594.0; (to accept 01/01/0001 23:59:59.999) http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg07989.html Thanks, it seems, that Joost in 2007 has falling in same problem as I now, when working on fcl-db test suite. (now I catch this also when working on fcl-db test suite) I guess, that he has wrote tests for dates '01/01/0001' and now I am writting test for datetimes '01/01/0001 00:00:01' to '01/01/0001 23:59:59'. So if this constant can not be changed, then I must write workaround for date '01/01/0001' and do not add time part to this date. L. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel