formatLong.mjs 765 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
  2. const dateFormats = {
  3. full: "y 'm'. MMMM d 'd'., EEEE",
  4. long: "y 'm'. MMMM d 'd'.",
  5. medium: "y-MM-dd",
  6. short: "y-MM-dd",
  7. };
  8. const timeFormats = {
  9. full: "HH:mm:ss zzzz",
  10. long: "HH:mm:ss z",
  11. medium: "HH:mm:ss",
  12. short: "HH:mm",
  13. };
  14. const dateTimeFormats = {
  15. full: "{{date}} {{time}}",
  16. long: "{{date}} {{time}}",
  17. medium: "{{date}} {{time}}",
  18. short: "{{date}} {{time}}",
  19. };
  20. export const formatLong = {
  21. date: buildFormatLongFn({
  22. formats: dateFormats,
  23. defaultWidth: "full",
  24. }),
  25. time: buildFormatLongFn({
  26. formats: timeFormats,
  27. defaultWidth: "full",
  28. }),
  29. dateTime: buildFormatLongFn({
  30. formats: dateTimeFormats,
  31. defaultWidth: "full",
  32. }),
  33. };