MCPcopy Index your code
hub / github.com/continuedev/continue / formatTimestamp

Function formatTimestamp

extensions/cli/src/ui/SessionSelector.tsx:18–30  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

16}
17
18function formatTimestamp(date: Date): string {
19 if (isToday(date)) {
20 return format(date, "h:mm a");
21 } else if (isYesterday(date)) {
22 return "yesterday";
23 } else if (isThisWeek(date)) {
24 return format(date, "EEEE"); // Day name (e.g., "Monday")
25 } else if (isThisYear(date)) {
26 return format(date, "MMM d"); // e.g., "Jan 15"
27 } else {
28 return format(date, "MMM d, yyyy"); // e.g., "Jan 15, 2023"
29 }
30}
31
32function formatMessage(message: string | undefined): string {
33 if (!message) return "(no messages)";

Callers 1

SessionSelectorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected