1.0.1 • Published 3 years ago

easyampm v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

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
1.0.1

3 years ago

1.0.0

3 years ago