function daysAgo
daysAgo(utcIso: string): number | null

Compute how many days ago an event started, relative to today in the configured timezone. Returns null if the event date is today or in the future, or if the date is empty/invalid. For past events, returns a positive integer (1 = yesterday).

Parameters

utcIso: string

Return Type

number | null

Usage

import { daysAgo } from "doc.ts";