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

@ -67,6 +67,7 @@
- [sleepycatcoding](https://github.com/sleepycatcoding) - [sleepycatcoding](https://github.com/sleepycatcoding)
- [TheMelmacian](https://github.com/TheMelmacian) - [TheMelmacian](https://github.com/TheMelmacian)
- [tehciolo](https://github.com/tehciolo) - [tehciolo](https://github.com/tehciolo)
- [scampower3](https://github.com/scampower3)
# Emby Contributors # Emby Contributors

View file

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