From 312d56b265fa2ebcaf6244a7d9bb67da7091f7f5 Mon Sep 17 00:00:00 2001
From: PrakashDurlabhji
Date: Thu, 15 Oct 2020 22:49:03 +0530
Subject: [PATCH] Update index.jsx
---
.../challenge-detail/Header/DeadlinesPanel/Card/index.jsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/shared/components/challenge-detail/Header/DeadlinesPanel/Card/index.jsx b/src/shared/components/challenge-detail/Header/DeadlinesPanel/Card/index.jsx
index 5efc2339be..154e95a46b 100644
--- a/src/shared/components/challenge-detail/Header/DeadlinesPanel/Card/index.jsx
+++ b/src/shared/components/challenge-detail/Header/DeadlinesPanel/Card/index.jsx
@@ -10,6 +10,7 @@ import './style.scss';
/* Date/time format to use in the card. */
const FORMAT = 'MMM DD, HH:mm';
+const FORMAT_YEAR = 'MMM DD YYYY, HH:mm';
export default function Card({ past, time, title }) {
const time2 = moment(time);
@@ -20,7 +21,7 @@ export default function Card({ past, time, title }) {
{title}
- {time2.format(FORMAT)}
+ {time2.format(time2.year() !== moment().year() ? FORMAT_YEAR : FORMAT)}
);