isSunday

Modified on Tue, 22 Aug 2023

Description

Use this function to check if a given date falls on a Sunday. It returns true if the date is a Sunday, and false otherwise.

Syntax

isSunday(date)

Returns

Return ValueDescription
True/FalseReturns true if the given date falls on a Sunday, otherwise false.

Sample

ExampleResultDescription
isSunday(2023-08-20)trueAugust 20th, 2023, falls on a Sunday, so the function returns true.
isSunday(2023-08-15)falseAugust 15th, 2023, does not fall on a Sunday, so the function returns false.

To view all the Date functions, click here.

See Also