[fpc-devel] Magic numbers used in TryEncodeDate
Bram Kuijvenhoven
bram at kuijvenhoven.net
Thu Apr 20 23:33:55 CEST 2006
Graeme Geldenhuys wrote:
> What is the meaning of these magic numbers used in the TryEncodeDate method?
> I would like to document them for FPC once I know the answer.
>
> 146097
> 1461
> 153
> 693900
I once read an article about a formula for calculating the day of the week from a date. It exploited similar tricks as TryEncodeDate. I will send an email later (tomorrow) with details about the formula used here.
Regards,
Bram
More information about the fpc-devel
mailing list