On Sat, 9 Nov 2013, Jürgen Hestermann wrote:


Am 2013-11-09 16:54, schrieb Michael Van Canneyt:
On Sat, 9 Nov 2013, Jürgen Hestermann wrote:
That would be a real performance hit (i.e. when sorting by date)
if you have stored dates in year, month, day... format.
Each comparison then needs multiple convertions each time.
Not if you store everything as a DateTime and use that. The format is such that it sorts naturally.

Storing dates as floats has a lot of drawbacks.
It's inaccurate, you always need a starting date and get other problems.

Can you prove this statement ?

I use this type since more than 15 years, never experienced a glitch.

Of course, I didn't have to represent stardate XYZ.NMO, but in my opinion, 
TDateTime is usable for 99,99% of all use cases.

Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to