Skip to content

Commit

Permalink
fixed 24 hour time format
Browse files Browse the repository at this point in the history
  • Loading branch information
yashchaudhari008 committed Nov 2, 2024
1 parent 5ece12f commit a529683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/clockUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const getTime = (currentDateObj: Date, is12HourFormat = true) => {
let hours = currentDateObj.getHours();
const minutes = currentDateObj.getMinutes();

const meridiem = hours < 12 ? "AM" : "PM";
const meridiem = is12HourFormat && (hours < 12 ? "AM" : "PM");

// Converts hours to 12-hour format
if (is12HourFormat) {
Expand Down

0 comments on commit a529683

Please sign in to comment.