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:
1 file changed
+3
-1
@@ -146,7 +146,9 @@ export class NotePromptsCommand {
|
||||
* @returns Formatted markdown string ready for insertion
|
||||
*/
|
||||
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',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
|
||||
Reference in new issue
Block a user