Rename Time.js to .ts

This commit is contained in:
Tuxedo Takodachi 2023-06-17 15:20:31 +02:00
parent 0c1b6a7f0d
commit 2a9a8ba7de

View File

@ -61,7 +61,8 @@ var Time = {
localeFormat(date, options, defaultValue) {
if (Conf['timeLocale']) {
try {
return Intl.DateTimeFormat(Conf['timeLocale'], options).format(date);
const formatter = Intl.DateTimeFormat(Conf['timeLocale'], options);
return formatter.format(date);
} catch (error) {}
}
return defaultValue;