Skip to content

It is a JS package to show time in 12/24H format from the given seconds after 00:00 /12:00AM

License

Notifications You must be signed in to change notification settings

muhammadZihad/easy-ampm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

It is a JS package to show time in 12/24H format from the given seconds after 00:00 /12:00AM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published