Question:
I want to compute the number of the week.
Thanks in advance
PLM
Answer:
This is pretty basic stuff. If you want the current week of the month, a simple function will do the trick:
function GetWeekOfMonth(Day : Integer) : Integer;begin if (Day >= 1) AND (Day <= 7) then Result := 1; if (Day >= 8) AND (Day <= 14) then Result := 2; if (Day >= 15) AND (Day <= 21) then Result := 3; if (Day >= 22) AND (Day <= 28) then Result := 4; if (Day > 29) then Result := 5;end;