endOfDay
Commons
stable
Returns a new Date set to the last millisecond of the given day (23:59:59.999 local time). The input date is not mutated.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- daterequiredDate
- The reference date. Only the year/month/day part is used; the time is replaced with 23:59:59.999.
API
Return value
The value returned by this util.
- A new Date at 23:59:59.999 on the same calendar day as the input.
Usage
Examples
Ready-to-paste usage snippets.
Get the last moment of a day