[fpc-pascal] Difficulty with DayOfWeek
Ched
charles.edouard.des.vastes.vignes at gmail.com
Sat Oct 19 12:31:00 CEST 2019
Dear All,
From https://www.freepascal.org/docs-html/rtl/sysutils/dayofweek.html :
DayOfWeek returns the day of the week from DateTime. Sunday is counted as day 1, Saturday is counted as
day 7.
From
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/DateUtils_DayOfTheWeek.html
:
DayOfTheWeek returns a value between 1 and 7, where 1 indicates Monday and 7 indicates Sunday
So, for FPC day 7 is saturday while for Delphi it's sunday... Is it a bug, a feature. Shouldn't a warning
be emitted, or so ?
Cheers, Raoul
More information about the fpc-pascal
mailing list