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.

18 lines (17 loc) 381 B
/** * Created by hustcc on 18/5/20. * Contract: i@hust.cc */ import { LocaleFunc } from './interface'; /** * register a locale * @param locale * @param func */ export declare const register: (locale: string, func: LocaleFunc) => void; /** * get a locale, default is en_US * @param locale * @returns {*} */ export declare const getLocale: (locale: string) => LocaleFunc;