From f80d4b89074b3ecf6abd1a64f5db016f59e33877 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 9 Jun 2013 09:35:50 -0400 Subject: [PATCH] only show end date if different --- dashboard-ui/scripts/librarybrowser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index b1e1c2fe7d..7f5775a5e6 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1332,7 +1332,13 @@ if (item.EndDate) { try { - text += "-" + parseISO8601Date(item.EndDate, { toLocal: true }).getFullYear(); + + var endYear = parseISO8601Date(item.EndDate, { toLocal: true }).getFullYear(); + + if (endYear != item.ProductionYear) { + text += "-" + parseISO8601Date(item.EndDate, { toLocal: true }).getFullYear(); + } + } catch (e) { console.log("Error parsing date: " + item.EndDate);