MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / prettyPrintDate

Function prettyPrintDate

packages/cli-v3/src/utilities/cliOutput.ts:52–66  ·  view source on GitHub ↗
(date: Date = new Date())

Source from the content-addressed store, hash-verified

50
51// Mar 27 09:17:25.653
52export function prettyPrintDate(date: Date = new Date()) {
53 let formattedDate = new Intl.DateTimeFormat("en-US", {
54 month: "short",
55 day: "2-digit",
56 hour: "2-digit",
57 minute: "2-digit",
58 second: "2-digit",
59 hour12: false,
60 }).format(date);
61
62 // Append milliseconds
63 formattedDate += "." + ("00" + date.getMilliseconds()).slice(-3);
64
65 return formattedDate;
66}
67
68export function prettyError(header: string, body?: string, footer?: string) {
69 const prefix = "Error: ";

Callers 3

executeTaskRunMethod · 0.85
#handleLogMethod · 0.85
#handleStdErrMethod · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…