Merge pull request #1165 from turt2live/travis/pad-12h

Don't pad 12h timestamps
pull/21833/head
Luke Barnard 2017-07-03 16:43:23 +01:00 committed by GitHub
commit b8dacd3bb1
3 changed files with 6 additions and 2 deletions

View File

@ -54,8 +54,8 @@ function pad(n) {
function twelveHourTime(date) {
let hours = date.getHours() % 12;
const minutes = pad(date.getMinutes());
const ampm = date.getHours() >= 12 ? 'PM' : 'AM';
hours = pad(hours ? hours : 12);
const ampm = date.getHours() >= 12 ? _t('PM') : _t('AM');
hours = hours ? hours : 12; // convert 0 -> 12
return `${hours}:${minutes}${ampm}`;
}

View File

@ -421,6 +421,8 @@
"Notifications": "Notifications",
"(not supported by this browser)": "(not supported by this browser)",
"<not supported>": "<not supported>",
"AM": "AM",
"PM": "PM",
"NOT verified": "NOT verified",
"No devices with registered encryption keys": "No devices with registered encryption keys",
"No display name": "No display name",

View File

@ -120,6 +120,8 @@
"zh-sg": "Chinese (Singapore)",
"zh-tw": "Chinese (Taiwan)",
"zu": "Zulu",
"AM": "AM",
"PM": "PM",
"A text message has been sent to +%(msisdn)s. Please enter the verification code it contains": "A text message has been sent to +%(msisdn)s. Please enter the verification code it contains",
"accept": "accept",
"%(targetName)s accepted an invitation.": "%(targetName)s accepted an invitation.",