> ## Documentation Index
> Fetch the complete documentation index at: https://gocharting.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# dayofweek constants

> Reference for the 7 constants of the dayofweek namespace: dayofweek.friday, dayofweek.monday, dayofweek.saturday, dayofweek.sunday and 3 more, each with its definition and an example.

> [!NOTE]
>
> Language version: 2 · Reference version: 2.7 · Date: 2026-10-25 · Compiler build: df7b3b14 · Namespace: dayofweek · Entries: 8

## `dayofweek` (library)

**Definition**

Named weekday constants for comparisons with the `dayofweek` series or `dayofweek(time)`:

`dayofweek.sunday` (`1`), `dayofweek.monday` (`2`), `dayofweek.tuesday` (`3`), `dayofweek.wednesday` (`4`), `dayofweek.thursday` (`5`), `dayofweek.friday` (`6`), `dayofweek.saturday` (`7`).

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek constants", overlay=true)
weekend = array.from(dayofweek.saturday, dayofweek.sunday)
isWeekend = array.includes(weekend, dayofweek)
bgcolor(isWeekend ? color.new(color.gray, 0.1) : na)
```

## `dayofweek.friday` (constant)

**Definition**

Weekday constant for Friday, an int with the value 6. Compare it with the `dayofweek` series or with `dayofweek(time)`.

**Type**

`const int`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek.friday Example")
isDay = dayofweek == dayofweek.friday
plot(isDay ? 1 : 0, title="Friday")
```

## `dayofweek.monday` (constant)

**Definition**

Weekday constant for Monday, an int with the value 2. Compare it with the `dayofweek` series or with `dayofweek(time)`.

**Type**

`const int`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek.monday Example")
isDay = dayofweek == dayofweek.monday
plot(isDay ? 1 : 0, title="Monday")
```

## `dayofweek.saturday` (constant)

**Definition**

Weekday constant for Saturday, an int with the value 7. Compare it with the `dayofweek` series or with `dayofweek(time)`.

**Type**

`const int`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek.saturday Example")
isDay = dayofweek == dayofweek.saturday
plot(isDay ? 1 : 0, title="Saturday")
```

## `dayofweek.sunday` (constant)

**Definition**

Weekday constant for Sunday, an int with the value 1. Compare it with the `dayofweek` series or with `dayofweek(time)`.

**Type**

`const int`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek.sunday Example")
isDay = dayofweek == dayofweek.sunday
plot(isDay ? 1 : 0, title="Sunday")
```

## `dayofweek.thursday` (constant)

**Definition**

Weekday constant for Thursday, an int with the value 5. Compare it with the `dayofweek` series or with `dayofweek(time)`.

**Type**

`const int`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek.thursday Example")
isDay = dayofweek == dayofweek.thursday
plot(isDay ? 1 : 0, title="Thursday")
```

## `dayofweek.tuesday` (constant)

**Definition**

Weekday constant for Tuesday, an int with the value 3. Compare it with the `dayofweek` series or with `dayofweek(time)`.

**Type**

`const int`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek.tuesday Example")
isDay = dayofweek == dayofweek.tuesday
plot(isDay ? 1 : 0, title="Tuesday")
```

## `dayofweek.wednesday` (constant)

**Definition**

Weekday constant for Wednesday, an int with the value 4. Compare it with the `dayofweek` series or with `dayofweek(time)`.

**Type**

`const int`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("dayofweek.wednesday Example")
isDay = dayofweek == dayofweek.wednesday
plot(isDay ? 1 : 0, title="Wednesday")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.