BUGFIX: traditional english needs to increase the hour > 30 mins past the hour

pull/719/head
adrian w kirk 2021-04-10 01:24:51 +01:00
parent 2946e10122
commit 0b11b47f91
1 changed files with 5 additions and 1 deletions

View File

@ -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"];