added export conversation feature.

This commit is contained in:
Xiaohan-Tian
2025-08-21 21:56:22 -07:00
parent c1112f41d5
commit 0c54332401
6 changed files with 181 additions and 8 deletions
+19 -1
View File
@@ -87,4 +87,22 @@ export function beatsToTimeString(
const mmm = milliseconds.toString().padStart(3, '0');
return `${BBB}:${B} | ${mm}:${ss}:${mmm}`;
}
}
/**
* Format a Date object into a human-readable local datetime string with timezone.
* Example: 2025/08/21, 19:57:11 GMT-7
*/
export function formatLocalDateTime(date: Date): string {
const options: Intl.DateTimeFormatOptions = {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: false,
timeZoneName: 'short'
};
return date.toLocaleString(undefined, options);
}