library: various fixes on metadata editor and bookshelf (#1663)

* i18n: update translations

* library: various fixes on metadata editor and bookshelf

* chore: enable parallel web builds checking
This commit is contained in:
Huang Xin
2025-07-22 22:04:44 +08:00
committed by GitHub
parent f03d6f6861
commit d1f5934947
28 changed files with 183 additions and 70 deletions
+2 -1
View File
@@ -123,7 +123,7 @@ export const getPrimaryLanguage = (lang: string | string[] | undefined) => {
return Array.isArray(lang) ? lang[0] : lang;
};
export const formatDate = (date: string | number | Date | null | undefined) => {
export const formatDate = (date: string | number | Date | null | undefined, isUTC = false) => {
if (!date) return;
const userLang = getUserLang();
try {
@@ -131,6 +131,7 @@ export const formatDate = (date: string | number | Date | null | undefined) => {
year: 'numeric',
month: 'long',
day: 'numeric',
timeZone: isUTC ? 'UTC' : undefined,
});
} catch {
return;