function dateToStartEnd
dateToStartEnd(
date: string | null,
durationDays?: number,
): { startAt: string | null; endAt: string | null; }

Convert a nullable date to the stored half-open range.

Parameters

date: string | null
optional
durationDays: number = 1

Return Type

{ startAt: string | null; endAt: string | null; }

Usage

import { dateToStartEnd } from "docs/database.ts";