Skip to main content

SUNDAY

SUNDAY = 7

Example

function IsSunday(const Value: TDateTime): Boolean;
begin
Result := DayOfTheWeek(Value) = SUNDAY;
end;

Usage

Represents Sunday as 7 in Velox's Monday-first weekday numbering.

Additional Technical Info

The Velox date-tools importer registers SUNDAY as a signed LongInt. It closes the Monday-first sequence and matches DayOfTheWeek.

This is the most obvious numbering trap: SysUtils DayOfWeek returns 1 for Sunday. Comparing that result to SUNDAY is always wrong even though both values are individually valid weekday numbers.

The constant does not define week boundaries for reporting, fiscal periods or locale display. State the numbering convention at every external/configuration boundary. The example is source-reviewed only; no weekday calculation was executed.

External references

Created 2026-07-15