An age in ms as short English words, rounded down so it never claims more recent than it is: "less than a minute", "4 min", "3 hr", "1 day", "2 days". It never counts seconds, so the words change at most once a minute.
import { formatPortholeAge } from "@/lib/ouro/porthole-view";Example
formatPortholeAge(4 * 60_000 + 59_000); // "4 min"Parameters
age- Type:
number
Returns
string
