(timestamp: number, unitName: TimeUnit, isUTC: boolean)
| 445 | // e.g., if the input unit is 'day', start calculate ticks from the first day of |
| 446 | // that month to make ticks "nice". |
| 447 | function getFirstTimestampOfUnit(timestamp: number, unitName: TimeUnit, isUTC: boolean) { |
| 448 | const upperUnitIdx = Math.max(0, indexOf(primaryTimeUnits, unitName) - 1); |
| 449 | return roundTime(new Date(timestamp), primaryTimeUnits[upperUnitIdx], isUTC).getTime(); |
| 450 | } |
| 451 | |
| 452 | function createEstimateNiceMultiple( |
| 453 | setMethodName: JSDateSetterNames, |
no test coverage detected