export const millisecondsToHourFormat = (milliseconds: number) => {
  let totalSeconds = Math.floor(milliseconds / 1000);

  let hours = Math.floor(totalSeconds / 3600);
  totalSeconds %= 3600;
  let minutes = Math.floor(totalSeconds / 60);
  let seconds = totalSeconds % 60;

  const formattedTime = [
    hours.toString().padStart(2, "0"),
    minutes.toString().padStart(2, "0"),
    seconds.toString().padStart(2, "0"),
  ].join(":");

  return formattedTime;
};

export const formatToDDMMYYYY = (date: Date) => {
  return `${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()}`;
};

export const hourToFormattedString = (hour: number) => {
  return `${hour.toString().padStart(2, "0")}:00`;
};
