All files / src/lib date.ts

100% Statements 5/5
100% Branches 5/5
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 61x 7x 4x 7x 7x  
export const parseDateMs = (value: string | null | undefined): number => {
	if (!value) return 0;
	const ms = Date.parse(value);
	return isNaN(ms) ? 0 : ms;
};