Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / assets / javascripts / dates.js
index 903fb01cb503d670fc989e92e5e9ed37e7b53522..ed5f28431c7297288dac0bd54b4c81258f36b715 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 jQuery(function($){
 $(document).on('ajax:complete arv:pane:loaded ready', function() {
     $('[data-utc-date]').each(function(i, elm) {
@@ -14,7 +18,7 @@ $(document).on('ajax:complete arv:pane:loaded ready', function() {
             if ($(elm).attr('data-utc-date-opts') && $(elm).attr('data-utc-date-opts').match(/noseconds/)) {
                 $(elm).text((ts.getHours() > 12 ? (ts.getHours()-12) : ts.getHours())
                             + ":" + (ts.getMinutes() < 10 ? '0' : '') + ts.getMinutes()
-                            + (ts.getHours() > 12 ? " PM " : " AM ")
+                            + (ts.getHours() >= 12 ? " PM " : " AM ")
                             + ts.toLocaleDateString());
             } else {
                 $(elm).text(ts.toLocaleTimeString() + " " + ts.toLocaleDateString());