<commit_before>/* eslint-disable radix */
// eslint-disable-next-line import/prefer-default-export
export const getTimeStringMinutes = (timeStr) => {
    const parts = timeStr.split(':');

    const hours = parseInt(parts[0]);
    const minutes = parseInt(parts[1]);
    const totalMin = hours * 60 + minutes;

    return totalMin;
};

export const getTimeStringFromMinutes = (totalMinutes) => {
    if (totalMinutes > 24 * 60) totalMinutes -= 24 * 60;

    const hours = Math.floor(totalMinutes / 60);
    const minutes = totalMinutes - hours * 60;

    return `${hours < 10 ? `0${hours}` : hours}:${minutes < 10 ? `0${minutes}` : minutes}`;
};
<commit_msg>Replace "24" by "0" in timestrings<commit_after>/* eslint-disable radix */
// eslint-disable-next-line import/prefer-default-export
export const getTimeStringMinutes = (timeStr) => {
    const parts = timeStr.split(':');

    const hours = parseInt(parts[0]);
    const minutes = parseInt(parts[1]);
    const totalMin = hours * 60 + minutes;

    return totalMin;
};

export const getTimeStringFromMinutes = (totalMinutes) => {
    if (totalMinutes > 24 * 60) totalMinutes -= 24 * 60;

    let hours = Math.floor(totalMinutes / 60);
    const minutes = totalMinutes - hours * 60;

    if (hours === 24) hours = 0;

    return `${hours < 10 ? `0${hours}` : hours}:${minutes < 10 ? `0${minutes}` : minutes}`;
};

{'fraction_non_alphanumeric': 0.1555880204528853, 'fraction_numerical': 0.036523009495982466, 'mean_word_length': 3.566666666666667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4982761', 'n_tokens_mistral': 486, 'n_tokens_neox': 439, 'n_words': 116}