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

# Weekday

> This function finds the day of the week, given a date. For example, given the date '2024-10-07', it will return a JSON: `{'weekday': 'Monday'}`

### Tool parameters

```json theme={null}
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "description": "The date in ISO 8601 format. For example, 2022-06-15 (June 15, 2022)."
    }
  },
  "required": ["date"]
}
```

Include default metadata: *False*

### Path

<ParamField path="date" type="string" required />

### Response

<ResponseField name="weekday" type="string" />

<RequestExample>
  ```bash Curl theme={null}
  curl --location --request GET 'https://tools.gptchatbot.it/weekday?date=2024-10-10' \
  --header 'Authorization: Bearer <token>' \
  --data-raw ''
  ```

  ```py Python theme={null}
  import requests

  url = 'https://tools.gptchatbot.it/weekday?date=2024-10-10'
  headers = {
      'Authorization': 'Bearer <token>'
  }

  response = requests.get(url, headers=headers)

  if response.status_code == 200:
      print("Request successful!")
      print(response.text)
  else:
      print("Request failed with status code:", response.status_code)
      print(response.text)
  ```

  ```ts JavaScript theme={null}
  const axios = require("axios");

  const url = "https://tools.gptchatbot.it/weekday?date=2024-10-10";
  const headers = {
    Authorization: "Bearer <token>",
  };

  axios
    .post(url, { headers })
    .then((response) => {
      console.log("Request successful!");
      console.log(response.text);
    })
    .catch((error) => {
      console.error("Request failed:", error);
    });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "weekday": "Thursday"
  }
  ```
</ResponseExample>
