Merge pull request #971 from turt2live/travis/12hr-hotfixes

Support 12hr time in full date
pull/21833/head
Matthew Hodgson 2017-05-30 20:15:39 +01:00 committed by GitHub
commit a9d2a950a8
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ module.exports = {
return this.formatFullDate(date); return this.formatFullDate(date);
}, },
formatFullDate: function(date) { formatFullDate: function(date, showTwelveHour=false) {
const days = getDaysArray(); const days = getDaysArray();
const months = getMonthsArray(); const months = getMonthsArray();
return _t('%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s', { return _t('%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s', {
@ -91,7 +91,7 @@ module.exports = {
monthName: months[date.getMonth()], monthName: months[date.getMonth()],
day: date.getDate(), day: date.getDate(),
fullYear: date.getFullYear(), fullYear: date.getFullYear(),
time: this.formatTime(date), time: showTwelveHour ? twelveHourTime(date) : this.formatTime(date),
}); });
}, },