Determine if a given date is a Saturday or Sunday

Hi All,

The goal is to determine if a given date (YYYY-MM-DD format) falls over a weekend (Saturday or Sunday).

I am looking at a calculate that for example:

  1. Input Date is provided.
  2. If the Date falls on a Saturday.
  3. Calculate a new Date (Input Date + 2)

OR

  1. Input Date is provided.
  2. If the Date falls on a Sunday.
  3. Calculate a new Date (Input Date + 1)

According to the Tokens you can use to format a date variable, you can use a single lowercase d.

e.g.:

{{ formatDate(1.date; "d") }}

This will output a number from 0-6, which tells you the day of week the date is on.

For more information, see date formatting below:

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

Articles & Videos

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

3 Likes