Skip to content

npm package for converting numbers to time display

License

Notifications You must be signed in to change notification settings

nmaruy27/num2time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

num2time

npm package for converting numbers to time display

Install

npm i @nmaruy27/num2time

or 

yarn add @nmaruy27/num2time

How to use

import num2time from '@nmaruy27/num2time';

let result = num2time(99999, 'hms');
// { hh: '27', mm: '46', ss: '39', timeformat: '27:46:39' }

let result = num2time(99999, 'hm');
// { hh: '27', mm: '46', ss: '39', timeformat: '27:46' }

let result = num2time(99999, 'h');
// { hh: '27', mm: '46', ss: '39', timeformat: '27' }

let result = num2time(99999, 'hms', '/');
// { hh: '27', mm: '46', ss: '39', timeformat: '27/46/39' }

About

npm package for converting numbers to time display

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published