Improves timestamp localization for note prompts

Uses the user's preferred language locale for timestamp formatting, enhancing regional customization and user experience

Allows automatic fallback to 'en-US' if navigator language is unavailable
This commit is contained in:
AlexKucera committed 2025-10-24 16:42:04 +02:00
1 parent 13645af300
commit 8e6441ff7d
1 file changed
+3 -1
+3 -1
View File
@@ -146,7 +146,9 @@ export class NotePromptsCommand {
* @returns Formatted markdown string ready for insertion * @returns Formatted markdown string ready for insertion
*/ */
private formatPrompts(prompts: string[]): string { private formatPrompts(prompts: string[]): string {
const timestamp = new Intl.DateTimeFormat('en-US', { // Use user's locale for timestamp formatting to respect regional preferences
const locale = navigator?.language ?? 'en-US';
const timestamp = new Intl.DateTimeFormat(locale, {
year: 'numeric', year: 'numeric',
month: 'short', month: 'short',
day: 'numeric', day: 'numeric',