Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-03-19 21:22:33 +01:00
parent 9285734fc2
commit d71239bb2c
1 changed files with 4 additions and 1 deletions

View File

@ -5768,7 +5768,10 @@ module.exports = (_ => {
const timeObj = InternalComponents.LibraryComponents.DateInput.parseDate(time);
const language = BDFDB.LanguageUtils.getLanguage().id;
let hours = timeObj.getHours();
if (hour12 && hours > 12) hours -= 12;
if (hour12) {
hours = hours == 0 ? 12 : hours;
if (hours > 12) hours -= 12;
}
const minutes = timeObj.getMinutes();
const seconds = timeObj.getSeconds();
const milli = timeObj.getMilliseconds();