<commit_before>const NUM_SECONDS_IN_MINUTE = 60;
const NUM_SECONDS_IN_HOUR = 3600;
const NUM_SECONDS_IN_DAY = 86400;
const NUM_SECONDS_IN_WEEK = 604800;
const NUM_SECONDS_IN_MONTH = 2592000; //average amount of days in month: 30
const NUM_SECONDS_IN_YEAR = 31536000; //going by 365 days in a year

exports.getTimeStringFromEpoch = function(timeval) {
    var now = Math.floor((new Date()).getTime() / 1000); //takes current time then converts from milliseconds to seconds
    var timeDelta = now - timeval;
    var timeDeltaAbs = Math.abs(timeDelta);
    var timeNum = 0;
    var timeStr = null;<commit_msg>Split now time portion into separate func.<commit_after>const NUM_SECONDS_IN_MINUTE = 60;
const NUM_SECONDS_IN_HOUR = 3600;
const NUM_SECONDS_IN_DAY = 86400;
const NUM_SECONDS_IN_WEEK = 604800;
const NUM_SECONDS_IN_MONTH = 2592000; //average amount of days in month: 30
const NUM_SECONDS_IN_YEAR = 31536000; //going by 365 days in a year

exports.getNowTime = function(){
    return Math.floor((new Date()).getTime() / 1000); //takes current time then converts from milliseconds to seconds
}

exports.getTimeStringFromEpoch = function(timeval) {
    var now = this.getNowTime();
    var timeDelta = now - timeval;
    var timeDeltaAbs = Math.abs(timeDelta);
    var timeNum = 0;
    var timeStr = null;
{'fraction_non_alphanumeric': 0.08785332314744079, 'fraction_numerical': 0.06417112299465241, 'mean_word_length': 4.527426160337553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2049811', 'n_tokens_mistral': 532, 'n_tokens_neox': 442, 'n_words': 131}