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

Merge pull request #4869 from scampower3/year-fix

Fix same year appears in <year> - <year> format under card.
This commit is contained in:
Bill Thornton 2023-10-12 00:26:27 -04:00 committed by GitHub
commit 78c3bd36ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -669,7 +669,7 @@ function getCardFooterText(item, apiClient, options, footerClass, progressHtml,
lines.push(globalize.translate('SeriesYearToPresent', productionYear || ''));
} else if (item.EndDate && item.ProductionYear) {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
lines.push(productionYear + ((endYear === item.ProductionYear) ? '' : (' - ' + endYear)));
lines.push(productionYear + ((endYear === productionYear) ? '' : (' - ' + endYear)));
} else {
lines.push(productionYear || '');
}