MCPcopy Index your code
hub / github.com/codeaashu/claude-code / formatTimestamp

Function formatTimestamp

src/commands/export/export.tsx:10–18  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

8import { renderMessagesToPlainText } from '../../utils/exportRenderer.js';
9import { writeFileSync_DEPRECATED } from '../../utils/slowOperations.js';
10function formatTimestamp(date: Date): string {
11 const year = date.getFullYear();
12 const month = String(date.getMonth() + 1).padStart(2, '0');
13 const day = String(date.getDate()).padStart(2, '0');
14 const hours = String(date.getHours()).padStart(2, '0');
15 const minutes = String(date.getMinutes()).padStart(2, '0');
16 const seconds = String(date.getSeconds()).padStart(2, '0');
17 return `${year}-${month}-${day}-${hours}${minutes}${seconds}`;
18}
19export function extractFirstPrompt(messages: Message[]): string {
20 const firstUserMessage = messages.find(msg => msg.type === 'user');
21 if (!firstUserMessage || firstUserMessage.type !== 'user') {

Callers 1

callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected