MCPcopy Create free account
hub / github.com/tinyplex/tinybase / getFixedInterval

Function getFixedInterval

src/ui-react-dom-charts/common/wilkinson.ts:346–355  ·  view source on GitHub ↗
(unit: TimeUnit, step: number)

Source from the content-addressed store, hash-verified

344};
345
346const getFixedInterval = (unit: TimeUnit, step: number): number =>
347 unit == WEEK_UNIT
348 ? step * 7 * DAY
349 : unit == DAY_UNIT
350 ? step * DAY
351 : unit == HOUR_UNIT
352 ? step * HOUR
353 : unit == MINUTE_UNIT
354 ? step * MINUTE
355 : step * SECOND;
356
357const getPadded = (value: number): string =>
358 value < 10 ? `0${value}` : value + EMPTY_STRING;

Callers 2

floorTimeFunction · 0.70
addTimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…