DateTime.dayOfWeek()

Returns the day of the week for a given date
DateTime.dayOfWeek(time:int)

Parameters

Name Type Действие Значение по умолчанию
time int Time in Unix timestamp

Return value

Day of the week (0-6) for a given date; 0 = Sunday, 1 = Monday, etc.

Description

Used in the method onUpdate

Example

let dayOfWeek = DateTime.dayOfWeek(DateTime.current());