From 01b7d7bb7c05b194c0a2ec0198652951b0f32528 Mon Sep 17 00:00:00 2001 From: turt2live Date: Fri, 30 Jun 2017 08:44:56 -0600 Subject: [PATCH 1/3] Don't pad 12h timestamps Signed-off-by: Travis Ralston --- src/DateUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DateUtils.js b/src/DateUtils.js index 545d92dd3b..79f5e1cfc0 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -55,7 +55,6 @@ 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); return `${hours}:${minutes}${ampm}`; } From e058dd58e5893b5a8c0b0efc3827a258a434bacd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 30 Jun 2017 09:29:40 -0600 Subject: [PATCH 2/3] Fix overzealous code deletion Signed-off-by: Travis Ralston --- src/DateUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DateUtils.js b/src/DateUtils.js index 79f5e1cfc0..56dd048945 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -55,6 +55,7 @@ function twelveHourTime(date) { let hours = date.getHours() % 12; const minutes = pad(date.getMinutes()); const ampm = date.getHours() >= 12 ? 'PM' : 'AM'; + hours = hours ? hours : 12; // convert 0 -> 12 return `${hours}:${minutes}${ampm}`; } From 45559f7cf0b21773e682253c387be2a72b0a4037 Mon Sep 17 00:00:00 2001 From: turt2live Date: Mon, 3 Jul 2017 09:25:03 -0600 Subject: [PATCH 3/3] AM/PM strings Signed-off-by: Travis Ralston --- src/DateUtils.js | 2 +- src/i18n/strings/en_EN.json | 2 ++ src/i18n/strings/en_US.json | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DateUtils.js b/src/DateUtils.js index 56dd048945..09ef9c996f 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -54,7 +54,7 @@ function pad(n) { function twelveHourTime(date) { let hours = date.getHours() % 12; const minutes = pad(date.getMinutes()); - const ampm = date.getHours() >= 12 ? 'PM' : 'AM'; + const ampm = date.getHours() >= 12 ? _t('PM') : _t('AM'); hours = hours ? hours : 12; // convert 0 -> 12 return `${hours}:${minutes}${ampm}`; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 397c2ecaaa..4940bea7a5 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -421,6 +421,8 @@ "Notifications": "Notifications", "(not supported by this browser)": "(not supported by this browser)", "": "", + "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", diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index 4b8b8a5d3c..6e94be47dc 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -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.",