A simple utility to convert minutes to a 24-hour or 12-hour time format with day indication.
To use this package, first import it into your project:
const Min2Hrs = require('min-2-hr');
Then, you can use the following methods to convert minutes to time formats:
let time24 = Min2Hrs.minuteTo24HrTime(1600); console.log(time24); // Output: "02:40 +1 day"
let time12 = Min2Hrs.minutesTo12HrTime(1600); console.log(time12); // Output: "02:40 AM +1 day"
Replace 1600 with the number of minutes you want to convert. If no value is provided, the default value is 12.
Feel free to customize the usage according to your needs.
npm install min-2-hr