1.0.8 • Published 3 years ago

@kykal/time-formatted v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

What is this?

This package brings functions that convert seconds into formatted time. Use the seconds you want to convert as argument.

shortTime(int seconds)
longTime(int seconds)

How to Import

//Just shortTime() function
const { shortTime } = require('@kykal/time-formatted')

//Just longTime() function
const { longTime } = require('@kykal/time-formatted');

//All functions (can import with whatever name you want)
const times = require('@kykal/time-formatted');

Examples

shortTime(int seconds)

console.log( shortTime(821) );
//Output: 13:41 

console.log( shortTime(8286) );
//Output: 2:18:06

console.log( times.shortTime(342) );
//Output: 5:42

longTime(int seconds)

console.log( longTime(321) );
//Output: 00:05:21

console.log( longTime(3609) );
//Output: 01:00:09 

console.log( times.longTime(657) );
//Output: 00:10:57
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago