dayofweek
The day of the week of the bar open (dayofweek.sunday = 1, UTC). The dayofweek of a time in a time zone.
#Functions
#dayofweekfunction
The day of the week of the bar open (dayofweek.sunday = 1, UTC). The dayofweek of a time in a time zone.
dayofweek(time: int, { timezone?: string = "UTC" }): int| Parameter | Type | Description |
|---|---|---|
time | int | A time in milliseconds since 1970 (UTC). |
timezone | stringdefault "UTC" | An IANA time zone such as "UTC" or "America/New_York". |
Returns int.
Example
const v = dayofweek(time, "UTC")Since ChartScript 1
#Variables
#dayofweekvariable
The day of the week of the bar open (dayofweek.sunday = 1, UTC). The dayofweek of a time in a time zone.
dayofweek(time: int, { timezone?: string = "UTC" }): intType series int.
Example
const v = dayofweekSince ChartScript 1
#Constants
| Name | Type | Description |
|---|---|---|
dayofweek.friday | int | Friday (6). |
dayofweek.monday | int | Monday (2). |
dayofweek.saturday | int | Saturday (7). |
dayofweek.sunday | int | Sunday (1). |
dayofweek.thursday | int | Thursday (5). |
dayofweek.tuesday | int | Tuesday (3). |
dayofweek.wednesday | int | Wednesday (4). |