min-2-hr
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Time Converter

A simple utility to convert minutes to a 24-hour or 12-hour time format with day indication.

Installation

Usage

To use this package, first import it into your project:

JavaScript

const Min2Hrs = require('min-2-hr');

Then, you can use the following methods to convert minutes to time formats:

Convert to 24-Hour Format

let time24 = Min2Hrs.minuteTo24HrTime(1600); console.log(time24); // Output: "02:40 +1 day"

Convert to 12-Hour Format

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

Package Sidebar

Install

npm i min-2-hr

Weekly Downloads

3

Version

1.0.5

License

MIT

Unpacked Size

5.06 kB

Total Files

7

Last publish

Collaborators

  • rstarkumawat