Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilkka Korhonen authored and Ilkka Korhonen committed Jul 12, 2024
1 parent 5122ed8 commit eb2dbb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/components/util/Time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export const getHourMinute = (v: any) => {
};

export const timeFormat = (h: number, m: number) => {
return h.toString() + ':' + (m < 10 ? '0' + m.toString() : m.toString());
return (
(h < 10 ? '0' + h.toString() : h.toString()) +
':' +
(m < 10 ? '0' + m.toString() : m.toString())
);
};

export const timeToHalfAndFullHours = (
Expand Down

0 comments on commit eb2dbb7

Please sign in to comment.