UNPKG

@xtsai/xai-utils

Version:

The xai-utils is an openai nodejs sdk compatible extension library.

27 lines (26 loc) 766 B
export declare const DB_DATETIME_EXPR = "yyyy-MM-dd HH:mm:ss.SSSS"; export declare const formatDate: (date?: any) => string; /** * * @param expr format expression like yyyy-MM-dd,default yyyyMMdd * @param date Date object or number or date string ,undefined will now * @returns string */ export declare const formatDateExpr: (date?: any, expr?: string) => string; /** * * @param date * string yyyy-MM-dd * number ms * date * @param expr * @returns */ export declare const formatDateTime: (date?: any, expr?: string) => string; /** * @see https://date-fns.org/v4.1.0/docs/format * 2024-06-11 17:15:50.560170 * @param input number |string Date * @returns string */ export declare const convertDBTimeString: (input: string | number | Date) => string;