UNPKG

nmgwap-time-formatting

Version:

时间格式化库

98 lines (88 loc) 1.82 kB
/** * @description 获取年 * @author 青年码农 * @param? 时间 * @returns yyyy */ export declare function getY(date?: number | string): string; /** * @description 获取月 * @author 青年码农 * @param? 时间 * @returns m */ export declare function getM(date?: number | string): string; /** * @description 获取日 * @author 青年码农 * @param? 时间 * @returns d */ export declare function getD(date?: number | string): string; /** * @description 获取年月日 * @author 青年码农 * @param? 时间 * @returns yyyy-mm-dd */ export declare function getYMD( date?: number | string, connector?: string ): string; /** * @description 获取月日 * @author 青年码农 * @param? 时间 * @returns mm-dd */ export declare function getMD( date?: number | string, connector?: string ): string; /** * @description 获取年月日时分 * @author 青年码农 * @param? 时间 * @returns yyyy-mm-dd hh:mm */ export declare function getYMDHM( date?: number | string, connector?: string ): string; /** * @description 获取年月日时分秒 * @author 青年码农 * @param? 时间 * @returns yyyy-mm-dd hh:mm:ss */ export declare function getYMDHMS( date?: number | string, connector?: string ): string; /** * @description 获取时分 * @author 青年码农 * @param? 时间 * @returns hh:mm */ export declare function getHM( date?: number | string, connector?: string ): string; /** * @description 获取时分秒 * @author 青年码农 * @param? 时间 * @returns hh:mm:ss */ export declare function getHMS( date?: number | string, connector?: string ): string; /** * @description 获取时间戳 * @author 青年码农 * @param? 时间 * @returns hh:mm:ss */ export declare function getTimeStamp(date?: string): number;