lastDayOfDecade

Modified on Thu, 24 Aug 2023

Description

Use this function to obtain the last day of a decade for the given date. The result will be in the local timezone.

Syntax

lastDayOfDecade(date)

Returns

Return ValueDescription
DateReturns a Date object representing the last day of the decade for the given date in the local timezone.

Sample

ExampleResultDescription
lastDayOfDecade(11-04-2023)2029-12-31Returns the last day of the decade for April 11, 2023, in the local timezone, which is December 31, 2029, marking the last day of the decade that includes 2023.

To view all the Date functions, click here.

See Also