import { timeAgo } from "https://deno.land/x/netzo@0.4.49/plugins/auth/utils/display.ts";
Returns how long ago a given date is from now.
Examples
Example 1
Example 1
import { timeAgo } from "../../../../auth/utils/display.ts";
import { SECOND, MINUTE, HOUR } from "../../deps/std/datetime/constants.ts";
timeAgo(new Date()); // Returns "just now"
timeAgo(new Date(Date.now() - 3 * HOUR)); // Returns "3 hours ago"
Parameters
date: Date