---
title: dayOfWeek()
slug: dayofweek
docTags: 
createdAt: 2021-09-14T17:45:02.000Z
---

Returns the day of the week of a particular date, where 1 = Monday and 7 = Sunday.

### Syntax

`dayOfWeek(date)`

### Parameters

| **Parameter** | **Type**                               | **Description**                      |
| ------------- | -------------------------------------- | ------------------------------------ |
| `date`        | [Date](docId\:xTAQdzvLBTAKjxRnpFwe9)   | The date to get the day-of-week from |

### Return Type

[Number](docId\:ucI5tCTfVBhonEJ6ZQijg)&#x20;

The day of the week. For example, passing in a date that is on a Monday will return `1`

### Examples

`dayOfWeek('2025-05-12')`

- Returns `1` because Monday, May 12, 2025 was a Monday.



### Related  Carrot&#x20;

- [formatDate()](docId\:SjKW09Yi2EekUQemddOAL) - Can also be used to display the full name of the data such as "Monday, May 12, 2025"&#x20;



