getMonday()function
getMonday(target?: PossibleDate, caller: AnyCaller = getMonday): Date
| Param | Type | |
|---|---|---|
target | PossibleDate | The date whose week to find Monday for (defaults to "now"). |
caller | AnyCaller |
| Return | |
|---|---|
Date | A new Date instance at midnight on Monday of the target week. |
| Throws | |
|---|---|
RequiredError | If target couldn't be converted to a valid date. |
Get a Date representing midnight on Monday of the specified week.
Examples
getMonday("2003-09-12") // Date instance for the Monday of that week at 00:00