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ist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTimeDifference = exports.getNumbers = exports.romanToDecimal = exports.decimalToRoman = exports.extractNumber = exports.formatNumbers = exports.unixToTime = exports.unixToDate = void 0;\n/**\n * Converts a Unix timestamp to a formatted date string.\n *\n * @param {number} num - The Unix timestamp to convert.\n * @returns {string} The formatted date string.\n */\nconst unixToDate = (num) => {\n    const date = new Date(num * 1000);\n    const convertedStr = date.toLocaleDateString(\"en-US\");\n    return convertedStr;\n};\nexports.unixToDate = unixToDate;\n/**\n * Converts a Unix timestamp to a formatted time string.\n *\n * @param {number} num - The Unix timestamp to convert.\n * @returns {string} The formatted time string in the format \"hours : minutes : seconds\".\n */\nconst unixToTime = (num) => {\n    const date = new Date(num * 1000);\n    const hours = date.getHours();\n    const minutes = \"0\" + date.getMinutes();\n    const seconds = \"0\" + date.getSeconds();\n    const convertedStr = hours + \" : \" + minutes.substr(-2) + \" : \" + seconds.substr(-2);\n    return convertedStr;\n};\nexports.unixToTime = unixToTime;\n/**\n * Formats a string containing a number into a formatted number string.\n *\n * @param {string} str - The string containing the number to be formatted.\n * @returns {string} The formatted number string.\n */\nconst formatNumbers = (str) => {\n    const num = parseInt(str);\n    const formattedNumbers = num.toLocaleString();\n    return formattedNumbers;\n};\nexports.formatNumbers = formatNumbers;\n/**\n * Extracts numbers from a given string.\n *\n * @param {string} str - The input string from which numbers need to be extracted.\n * @returns {string} - The extracted numbers as a string.\n */\nconst extractNumber = (str) => {\n    const regex = /[0-9/ /]/g;\n    const nums = str.match(regex);\n    const extractedNumber = nums ? nums.join(\"\") : \"\";\n    return extractedNumber;\n};\nexports.extractNumber = extractNumber;\n/**\n * Converts a decimal number to a Roman numeral.\n * @param {number} num - The decimal number to convert.\n * @returns {string} The Roman numeral representation of the decimal number.\n */\nconst decimalToRoman = (num) => {\n    const intToRoman = (num) => {\n        let result = \"\";\n        while (num) {\n            if (num >= 1000) {\n                result += \"M\";\n                num -= 1000;\n            }\n            else if (num >= 500) {\n                if (num >= 900) {\n                    result += \"CM\";\n                    num -= 900;\n                }\n                else {\n                    result += \"D\";\n                    num -= 500;\n                }\n            }\n            else if (num >= 100) {\n                if (num >= 400) {\n                    result += \"CD\";\n                    num -= 400;\n                }\n                else {\n                    result += \"C\";\n                    num -= 100;\n                }\n            }\n            else if (num >= 50) {\n                if (num >= 90) {\n                    result += \"XC\";\n                    num -= 90;\n                }\n                else {\n                    result += \"L\";\n                    num -= 50;\n                }\n            }\n            else if (num >= 10) {\n                if (num >= 40) {\n                    result += \"XL\";\n                    num -= 40;\n                }\n                else {\n                    result += \"X\";\n                    num -= 10;\n                }\n            }\n            else if (num >= 5) {\n                if (num >= 9) {\n                    result += \"IX\";\n                    num -= 9;\n                }\n                else {\n                    result += \"V\";\n                    num -= 5;\n                }\n            }\n            else {\n                if (num >= 4) {\n                    result += \"IV\";\n                    num -= 4;\n                }\n                else {\n                    result += \"I\";\n                    num -= 1;\n                }\n            }\n        }\n        return result;\n    };\n    const convertedToRoman = intToRoman(Math.abs(Number(num)));\n    return convertedToRoman;\n};\nexports.decimalToRoman = decimalToRoman;\n/**\n * Converts a Roman numeral to decimal.\n *\n * @param {string} romanNum - The Roman numeral to convert.\n * @returns {string} The decimal representation of the Roman numeral.\n */\nconst romanToDecimal = (romanNum) => {\n    const romanToInt = (s) => {\n        const legend = \"IVXLCDM\";\n        const l = [1, 5, 10, 50, 100, 500, 1000];\n        let sum = 0;\n        while (s) {\n            if (!!s[1] && legend.indexOf(s[0]) < legend.indexOf(s[1])) {\n                sum += l[legend.indexOf(s[1])] - l[legend.indexOf(s[0])];\n                s = s.substring(2, s.length);\n            }\n            else {\n                sum += l[legend.indexOf(s[0])];\n                s = s.substring(1, s.length);\n            }\n        }\n        return sum;\n    };\n    const convetedToDecimal = romanToInt(romanNum.toUpperCase()).toString();\n    return convetedToDecimal;\n};\nexports.romanToDecimal = romanToDecimal;\n/**\n * Generates a string containing a list of numbers from a starting number to an ending number.\n *\n * @param {number} startingNum - The starting number of the number series.\n * @param {number} endingNum - The ending number of the number series.\n * @returns {string} - A string containing the list of numbers.\n */\nconst getNumbers = (startingNum, endingNum) => {\n    let numbersList = \"\";\n    for (let numberSeries = startingNum; numberSeries <= endingNum; numberSeries++) {\n        numbersList += numberSeries.toString() + \"\\n\";\n    }\n    return numbersList;\n};\nexports.getNumbers = getNumbers;\n/**\n * Calculates the time difference between two dates.\n * @param {string} date1 - The first date. Format: year-month-day.\n * @param {string} date2 - The second date. Format: year-month-day.\n * @returns {object} An object containing the time difference in milliseconds, seconds, minutes, hours, days, months, and years.\n */\nconst getTimeDifference = (date1, date2) => {\n    const dateOne = new Date(date1);\n    const dateTwo = new Date(date2);\n    const differenceInMilliSecs = Math.abs(dateTwo.getTime() - dateOne.getTime());\n    const seconds = Math.floor(differenceInMilliSecs / 1000);\n    const minutes = Math.floor(seconds / 60);\n    const hours = Math.floor(minutes / 60);\n    const days = Math.floor(hours / 24);\n    const months = Math.floor(days / 30);\n    const years = Math.floor(months / 12);\n    return {\n        milliseconds: differenceInMilliSecs,\n        seconds: seconds,\n        minutes: minutes,\n        hours: hours,\n        days: days,\n        months: months,\n        years: years,\n    };\n};\nexports.getTimeDifference = getTimeDifference;\n"]}