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

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

Parameters

utcIso: string

Return Type

number | null

Usage

import { daysAgo } from "doc.ts";