js • Lines: 45import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
// thứ Sáu, ngà y 25 tháng 08 năm 2017
full: "EEEE, 'ngà y' d MMMM 'năm' y",
// ngà y 25 tháng 08 năm 2017
long: "'ngà y' d MMMM 'năm' y",
// 25 thg 08 năm 2017
medium: "d MMM 'năm' y",
// 25/08/2017
short: "dd/MM/y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
// thứ Sáu, ngà y 25 tháng 08 năm 2017 23:25:59
full: "{{date}} {{time}}",
// ngà y 25 tháng 08 năm 2017 23:25
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};