klyn.time.DateTime.dayOfWeek
property
public readonly property dayOfWeek as Int:
Description

Returns the day of the week (0 = Sunday, 1 = Monday, ..., 6 = Saturday).

The calculation uses this instance's time zone, including dates whose local calendar day differs from UTC.

Returns

Local day of the week.

Example
monday = DateTime(2024, 1, 1, timeZone=TimeZone.UTC)
assert monday.dayOfWeek == 1