• Hook to convert seconds from midnight to a human readable time format

    The hook will use the time format based on the regional settings

    Parameters

    • secondsFromMidnight: DateRelativeDataProps

      The number of seconds from midnight

    Returns {
        hours: number;
        minutes: number;
        seconds: number;
        formattedTime: string;
        timeActions: {
            setHours: Dispatch<SetStateAction<number>>;
            setMinutes: Dispatch<SetStateAction<number>>;
            setSeconds: Dispatch<SetStateAction<number>>;
        };
    }

    The hours, minutes, seconds, formatted time and actions to update the time

    • hours: number
    • minutes: number
    • seconds: number
    • formattedTime: string
    • timeActions: {
          setHours: Dispatch<SetStateAction<number>>;
          setMinutes: Dispatch<SetStateAction<number>>;
          setSeconds: Dispatch<SetStateAction<number>>;
      }
      • setHours: Dispatch<SetStateAction<number>>
      • setMinutes: Dispatch<SetStateAction<number>>
      • setSeconds: Dispatch<SetStateAction<number>>