Skip to content

getLastDayOfWeek

The getLastDayOfWeek() function returns the Sunday corresponding to the week of the provided TheDate.

Interactive example

Syntax

typescript
function getLastDayOfWeek(
	input: TheDate
): TheDate

Parameters

  • input: Target TheDate.

Return value

A TheDate representing Sunday of the same week.

See also

Sources

Released under the MIT license.