Merge pull request #150133 from aifreedom/date-string-locale

Format date strings with the right locale
This commit is contained in:
Sandeep Somavarapu
2022-05-23 12:59:50 +02:00
committed by GitHub
@@ -6,7 +6,7 @@
import 'vs/css!./media/extensionEditor';
import { localize } from 'vs/nls';
import * as arrays from 'vs/base/common/arrays';
import { OS } from 'vs/base/common/platform';
import { OS, locale } from 'vs/base/common/platform';
import { Event, Emitter } from 'vs/base/common/event';
import { Cache, CacheResult } from 'vs/base/common/cache';
import { Action, IAction } from 'vs/base/common/actions';
@@ -997,11 +997,11 @@ export class ExtensionEditor extends EditorPane {
append(moreInfo,
$('.more-info-entry', undefined,
$('div', undefined, localize('release date', "Released on")),
$('div', undefined, new Date(gallery.releaseDate).toLocaleString(undefined, { hourCycle: 'h23' }))
$('div', undefined, new Date(gallery.releaseDate).toLocaleString(locale, { hourCycle: 'h23' }))
),
$('.more-info-entry', undefined,
$('div', undefined, localize('last updated', "Last updated")),
$('div', undefined, new Date(gallery.lastUpdated).toLocaleString(undefined, { hourCycle: 'h23' }))
$('div', undefined, new Date(gallery.lastUpdated).toLocaleString(locale, { hourCycle: 'h23' }))
)
);
}