Skip to content

getFirstDayOfWeek

The getFirstDayOfWeek() function returns the Monday corresponding to the week of the provided TheDate.

Interactive example

Syntax

typescript
function getFirstDayOfWeek(
	input: TheDate
): TheDate

Parameters

  • input: TheDate whose first day of the week is desired.

Return value

A TheDate representing Monday of the same week.

See also

Sources

Released under the MIT license.