MCPcopy Create free account
hub / github.com/api-platform/website / toLocaleDate

Function toLocaleDate

pwa/utils/index.tsx:39–49  ·  view source on GitHub ↗
(
  date,
  options = {
    day: "2-digit",
    month: "short",
    year: "numeric",
  }
)

Source from the content-addressed store, hash-verified

37 date: string,
38 options?: Intl.DateTimeFormatOptions
39) => string = (
40 date,
41 options = {
42 day: "2-digit",
43 month: "short",
44 year: "numeric",
45 }
46) => {
47 const d = new Date(date);
48 return d.toLocaleString("en-US", options);
49};
50
51export const convertTime: (time: string) => string = (time) =>
52 dayjs(time, "HH:mm").format("HH:mm");

Callers 2

EventInfosCardFunction · 0.90
EventInfosCardFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected