What is the difference between the two functions "IsSameDay" and "SameDate" in the Delphi DateUtils library?
+1
A:
Appears to be nothing at all...Implemented differently but one is excess. I'd use SameDate()
Darian Miller
2008-12-19 03:21:43
+5
A:
The start of the day before day zero is TDateTime(-1.0)
. Noon of that day is TDateTime(-1.5)
.
IsSameDay(-1.5, -1); // False
SameDate(-1.5, -1); // True
For positive dates, the functions are equivalent.
Rob Kennedy
2008-12-19 04:10:55