UNPKG

light-date

Version:

Blazing fast & lightweight (180 bytes) date formatting for Node.js and the browser.

13 lines (12 loc) 501 B
/** * Use this API for simple, most common formatting. * * @param {Date} date - Date object, which should be used. * @param {string} exp - String, which you want to format, for example: `{yyyy}-{MM}-{dd}` or Current time: `{hh}:{mm}:{ss}`. * @return {string} String with formatted date. * * @example * format(new Date(2014, 1, 11), '{yyyy}-{MM}-{dd}') //=> '2014-01-11' */ export declare const format: (date: Date, exp: string) => string; export { default as localeFormat } from './locale';