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.
19 lines (18 loc) • 444 B
TypeScript
/**
* get the datetime attribute, `datetime` are supported.
* @param node
* @returns {*}
*/
export declare function getDateAttribute(node: HTMLElement): string;
/**
* set the node attribute, native DOM
* @param node
* @param timerId
* @returns {*}
*/
export declare function setTimerId(node: HTMLElement, timerId: number): void;
/**
* get the timer id
* @param node
*/
export declare function getTimerId(node: HTMLElement): number;