getDayOfWeek
The getDayOfWeek() function returns the day of the week of a TheDate (1 = Monday, 7 = Sunday) taking an optional timezone into account.
Interactive example
Syntax
typescript
function getDayOfWeek<
GenericInput extends TheDate
>(
input: GenericInput,
timezone?: Timezone
): numberParameters
input: TargetTheDate.timezone: Timezone (optional).
Return value
An integer from 1 to 7 representing the ISO weekday.
