UNPKG

timeago.js

Version:

timeago.js is a simple library (only 1kb) to used to format datetime with `*** time ago` statement. eg: '3 hours ago'. localization supported.

14 lines (13 loc) 385 B
import { Opts } from './interface'; /** * cancel a timer or all timers * @param node - node hosting the time string */ export declare function cancel(node?: HTMLElement): void; /** * render a dom realtime * @param nodes * @param locale * @param opts */ export declare function render(nodes: HTMLElement | HTMLElement[] | NodeList, locale?: string, opts?: Opts): HTMLElement[];