MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / parseTimestampMs

Function parseTimestampMs

src/utils/pomodoroTime.ts:5–12  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

3export const MAX_POMODORO_DURATION_SECONDS = 120 * 60;
4
5function parseTimestampMs(value: string | undefined): number | null {
6 if (!value) {
7 return null;
8 }
9
10 const timestamp = Date.parse(value);
11 return Number.isFinite(timestamp) ? timestamp : null;
12}
13
14export function clampPomodoroDurationSeconds(seconds: number): number {
15 if (!Number.isFinite(seconds)) {

Callers 2

getActiveElapsedSecondsFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected