Skip to content

getLastDayOfMonth

The getLastDayOfMonth() function returns the last day of the month corresponding to the provided TheDate.

Interactive example

Syntax

typescript
function getLastDayOfMonth(
	input: TheDate
): TheDate

Parameters

  • input: Target TheDate.

Return value

A TheDate set to the last day of the same month (midnight UTC).

See also

Sources

Released under the MIT license.