From 583fdfbb9fe1004e8d541082b3bbabdf80e26456 Mon Sep 17 00:00:00 2001 From: turt2live Date: Tue, 30 May 2017 13:11:57 -0600 Subject: [PATCH] Support 12hr time in full date Signed-off-by: Travis Ralston --- src/DateUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DateUtils.js b/src/DateUtils.js index 015b645fa8..0bce7c8a16 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -83,7 +83,7 @@ module.exports = { return this.formatFullDate(date); }, - formatFullDate: function(date) { + formatFullDate: function(date, showTwelveHour=false) { const days = getDaysArray(); const months = getMonthsArray(); return _t('%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s', { @@ -91,7 +91,7 @@ module.exports = { monthName: months[date.getMonth()], day: date.getDate(), fullYear: date.getFullYear(), - time: this.formatTime(date), + time: showTwelveHour ? twelveHourTime(date) : this.formatTime(date), }); },