readDateCursor
function readDateCursor(cursor?: unknown): Date | undefined;Read a date cursor as a Date.
Returns undefined rather than throwing for an absent, differently-typed, or
unparseable cursor: a source meeting one of those is on its first run or is
reading something an older version wrote, and should simply start from the
beginning.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
cursor? | unknown | The source’s previous cursor (ctx.cursor). |
Returns
Section titled “Returns”Date | undefined
The cursor date, or undefined when there is not a usable one.