Get the starting point of a timeframe based on specified time unit.
getStartOf(new Date(2020, 3, 2, 10, 30), TimeUnit.HOURS) // "2020-04-02T17:00:00.000Z"getStartOf(new Date(2020, 3, 2, 10, 30), TimeUnit.DAYS) // "2020-04-02T07:00:00.000Z"getStartOf(new Date(2020, 3, 2, 10, 30), TimeUnit.MONTHS) // "2020-04-01T07:00:00.000Z"
JavaScript date object at the beginning of the specified time unit
JavaScript date object
String token representing time unit
Generated using TypeDoc
Get the starting point of a timeframe based on specified time unit.
Example
Returns
JavaScript date object at the beginning of the specified time unit