MCPcopy Index your code
hub / github.com/code-pushup/cli / formatDate

Function formatDate

packages/utils/src/lib/formatting.ts:70–83  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

68}
69
70export function formatDate(date: Date): string {
71 const locale = 'en-US'; // fixed locale to ensure consistency across local defaults execution
72 return date
73 .toLocaleString(locale, {
74 weekday: 'short',
75 month: 'short',
76 day: 'numeric',
77 year: 'numeric',
78 hour: 'numeric',
79 minute: '2-digit',
80 timeZoneName: 'short',
81 })
82 .replace(/\u202F/g, ' '); // see https://github.com/nodejs/node/issues/45171
83}
84
85export function truncateText(
86 text: string,

Callers 2

aboutSectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected