Skip to content

Commit b13c948

Browse files
committed
Fix bug where noon appears as 12 AM
1 parent 99d1e9f commit b13c948

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ function getFormattedTimeStringFromObject(timeObject) {
622622
var pmString = "";
623623

624624
//convert to 12 hour if necessary
625-
if (!use24HourTime && timeObject.hours > 12) {
626-
timeObject.hours -= 12;
625+
if (!use24HourTime && timeObject.hours >= 12) {
626+
if (timeObject.hours > 12) { timeObject.hours -= 12};
627627
pmString = " PM";
628628

629629
} else if (!use24HourTime) {

0 commit comments

Comments
 (0)