UNPKG

@log4js2/core

Version:

log4js2 is a fast and lightweight logging library that enables logging flexibility within JavaScript/TypeScript applications, similar to Apache's [Log4j2 library](https://logging.apache.org/log4j/2.x/). It can also serve as a drop-in replacement for log4

26 lines (25 loc) 757 B
/** * Pads numbers in the date format * * @param {string|number} value * @param {number} length * @param {string} character * * @returns {string} the padded string */ export declare const padLeft: (value: string | number, length: number, character?: string) => string; export declare enum DateTimeFormat { DEFAULT = "yyyy-MM-dd HH:mm:ss,S", ABSOLUTE = "HH:mm:ss,S", COMPACT = "yyyyMMddHHmmssS", DATE = "dd MMM yyyy HH:mm:ss,S", ISO8601 = "yyyy-MM-ddTHH:mm:ss,S", ISO8601_BASIC = "yyyyMMddTHHmmss,S" } /** * Converts a date to a formatted string * @param {Date | string | number} date * @param {string} mask * @returns {string} */ export declare const formatDate: (date: string | number | Date, mask?: string) => string;