easyampm
v1.0.1
Published
This is a simple package for converting given Seconds (second count starts from 12:00AM) into 12/24H time format.
Downloads
1
Readme
easy-ampm
This is a simple package for converting given Seconds (second count starts from 12:00AM) into 12/24H time format.
Installation
npm i easyampm --save
Then...
import {easyampm} from 'easyampm';
let converted_time = easyAmPm({
time: 6300,
format: "12H",
spaced: false
});
Options
easyAmPm() supports 3 options (1 of them is required)
- time - seconds (Required | Must be an Integer number between 0 to 86399)
- format - 12H | 24H (Default is 12H)
- spaced - boolean (Default is false)
Examples
- spaced - true => 12:10 AM false => 12:10 AM