On 06/8/12 1:32, leledumbo wrote:
Minor amendment needed to leledumbo's code to give Friday, and a five
year range:
uses SysUtils;
const startYr: word = 2012;
var dt: TDateTime;
year, month: word;
begin
for year in [0..4] do
for month in [1..12] do
begin
dt := EncodeDate(startYr + year, month, 13);
if (DayOfWeek(dt) = 6) then
begin
writeln(FormatDateTime('DDDD, DD-MM-YYYY',dt));
end;
end;
end.
Howard
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal