From 0b11b47f9131c6adbb6555980d023ee7bc26d53c Mon Sep 17 00:00:00 2001 From: adrian w kirk Date: Sat, 10 Apr 2021 01:24:51 +0100 Subject: [PATCH] BUGFIX: traditional english needs to increase the hour > 30 mins past the hour --- apps/slidingtext/slidingtext.local.en2.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/slidingtext/slidingtext.local.en2.js b/apps/slidingtext/slidingtext.local.en2.js index b651cfc97..822d43af8 100644 --- a/apps/slidingtext/slidingtext.local.en2.js +++ b/apps/slidingtext/slidingtext.local.en2.js @@ -38,8 +38,12 @@ class EnglishTraditionalDateFormatter extends DateFormatter { } name(){return "English Traditional";} formatDate(date){ - var hours = hoursToText(date.getHours()); var mins = date.getMinutes(); + var hourOfDay = date.getHours(); + if(mins > 30){ + hourOfDay += 1; + } + var hours = hoursToText(hourOfDay); // Deal with the special times first if(mins == 0){ return [hours,"", "O'","CLOCK"];