1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Uses now proper toLocaleString function

This commit is contained in:
Hadi Charara 2022-07-03 14:03:39 -04:00
parent 66f33b368b
commit df39a9a1ff
9 changed files with 22 additions and 22 deletions

View file

@ -909,13 +909,13 @@ import { appRouter } from '../appRouter';
}
if (options.showYear || options.showSeriesYear) {
const productionYear = item.ProductionYear?.toLocaleString(getCurrentDateTimeLocale(), {useGrouping: false});
const productionYear = datetime.toLocaleString(item.ProductionYear, {useGrouping: false});
if (item.Type === 'Series') {
if (item.Status === 'Continuing') {
lines.push(globalize.translate('SeriesYearToPresent', productionYear || ''));
} else {
if (item.EndDate && item.ProductionYear) {
const endYear = datetime.parseISO8601Date(item.EndDate).getFullYear().toLocaleString(getCurrentDateTimeLocale(), {useGrouping: false});
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), {useGrouping: false});
lines.push(productionYear + ((endYear === item.ProductionYear) ? '' : (' - ' + endYear)));
} else {
lines.push(productionYear || '');