Skip to content

AdmiralCloud/ac-timeConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AC TimeConverter

This little helper converts timestamps to seconds and vice versa. Use it for transcoding or display purposes of videos and other media files.

Usage

const acts = require('ac-timeConverter')

Convert seconds to timestamp

let timeStamp = acts.timestampFromSeconds(300)
// -> 00:00:05

Convert timestamp to seconds

let seconds = acts.secondsFromTimestamp('00:00:06')
// -> 6

Duration between timestamps

let duration = acts.duration('00:00:03', '00:00:06')
// -> 3

About

Converts timestamps to seconds and vice versa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published