1.0.0 • Published 1 year ago

12to24-cvt v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Installation

You can install this package via npm:

npm install 12to24-cvt

Usage

const convert12To24 = require('12to24-cvt');

// Example 1: Convert time from 12-hour format to 24-hour format
const time12_1 = '4:30 PM';
const time24_1 = convert12To24(time12_1);
console.log(`Time in 24-hour format: ${time24_1}`);

// Example 2: Convert another time
const time12_2 = '9:45 AM';
const time24_2 = convert12To24(time12_2);
console.log(`Time in 24-hour format: ${time24_2}`);