import { getCurrentLocale } from "../../../../../../utils/locale.js";
import dayjs from "dayjs";
//#region src/components/table/Actions/component/ExportImport/utils/date.ts
/**
* @Title: 格式化日期
* @Describe:
* @Author: Wzw
* @param {string} date
* @param {string} format
*/
const formatDate = (date, format) => {
	if (!date) return date;
	const lang = getCurrentLocale();
	let _format = format || ["HH:mm:ss DD/MM/YYYY", "YYYY-MM-DD HH:mm:ss"];
	let type = lang === "en-US" || lang === "en" ? _format[0] : _format[1];
	return dayjs(date).format(type);
};
//#endregion
export { formatDate };
