src/vs/workbench/contrib/localHistory/browser/localHistory.ts/getLocalHistoryDateFormatter
export function getLocalHistoryDateFormatter(): ILocalHistoryDateFormatter {
	if (!localHistoryDateFormatter) {
		const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' };

		let formatter: Intl.DateTimeFormat;
		try {
			formatter = new Intl.DateTimeFormat(language, options);
		} catch (error) {
			formatter = new Intl.DateTimeFormat(undefined, options); // error can happen when language is invalid (https://github.com/microsoft/vscode/issues/147086)
		}

		localHistoryDateFormatter = {
			format: date => formatter.format(date)
		};
	}

	return localHistoryDateFormatter;
}