Skip to content

⌚ Simple hh:mm:ss time formatting utility for use in media players

License

Notifications You must be signed in to change notification settings

Goldob/hh-mm-ss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jul 9, 2016
377363c · Jul 9, 2016

History

9 Commits
Jul 9, 2016
Jul 9, 2016
Jul 9, 2016
Jul 9, 2016
Jul 9, 2016
Jul 9, 2016

Repository files navigation

hh-mm-ss: time formatting utility Build Status

var TimeFormat = require('hh-mm-ss')

TimeFormat.toMs('01:20:00')           // 4800000

TimeFormat.fromMs(45250)              // '00:45.250'
TimeFormat.fromMs(150000)             // '02:30'
TimeFormat.fromMs(3600000)            // '01:00:00'

TimeFormat.fromMs(0, 'hh:mm:ss')      // '00:00:00'

Supported formats: mm:ss (default), hh:mm:ss, mm:ss.sss, hh:mm:ss.sss

License

MIT