move macos build files to resources, fix date for i18n

This commit is contained in:
vapormusic 2022-01-25 21:16:36 +07:00
parent 2108dd5975
commit 3e8df50847
6 changed files with 13 additions and 25 deletions

View file

@ -441,11 +441,11 @@
let month, year;
try {
const releaseDate = new Date(date);
month = new Intl.DateTimeFormat('en-US', {month: 'long'}).format(releaseDate);
date = releaseDate.getDate();
year = releaseDate.getFullYear();
// month = new Intl.DateTimeFormat(this.app.cfg.general.language.replace('_','-'), {month: 'long'}).format(releaseDate);
// date = releaseDate.getDate();
// year = releaseDate.getFullYear();
return prefix + date + " " + month + " " + year;
return prefix + new Intl.DateTimeFormat(this.app.cfg.general.language?.replace('_','-') ?? 'en-US', {day:'numeric',month: 'long', year: 'numeric'}).format(releaseDate);
} catch (e) {
return ""
}