front-standard-utils
Version:
21 lines (20 loc) • 762 B
TypeScript
/**
* @description 格式化时间 + 0
* @param {number/string} number
* @returns {string|number}
*/
export declare const formatNumber: (number: number | string) => string | number;
/**
* @description 格式化年月日时分秒时间 2022-01-01 12:12:12
* @param {number} timestamp 时间戳
* @param {string} beforeSeparate 年月日分隔符 默认-
* @param {string} afterSeparate 时分秒分隔符 默认:
* @returns {string}
*/
export declare const formatDate: (timestamp: number, beforeSeparate?: string, afterSeparate?: string) => string;
/**
* @description 格式化时间 返回 刚刚/5分钟前
* @param {number} timestamp
* @returns {string}
*/
export declare const getFormatTime: (timestamp: number) => string;