Skip to content

getWeekStartDate Type documentation

(current: Date, weekStartDay: WeekStart = 'monday') => Date
Function
Get the first date of the week based on the input date.
-
Returns a new date object which is the start of the current week.
Parameters
a date object from where the last date of a week is derived.
current: Date
optional when a week shall start.
weekStartDay: WeekStart = 'monday'

Types Documentation

("monday" | "saturday" | "sunday" | undefined)

Except where otherwise noted, content on this site is licensed under MIT License.