isLastDayOfMonth

Modified on Tue, 22 Aug 2023

Description

Use this function to check if the given date corresponds to the last day of a month. It will return true if the date falls on the last day of a month and false otherwise.

Syntax

isLastDayOfMonth(date)

Returns

Return ValueDescription
True/FalseReturns true if the date corresponds to the last day of a month, otherwise false.

Sample

ExampleResultDescription
isLastDayOfMonth(2023-04-30)trueApril 30th, 2023, is the last day of the month, so the function returns true.
isLastDayOfMonth(2023-04-15)falseApril 15th, 2023, is not the last day of the month, so the function returns false.

To view all the Date functions, click here.

See Also