Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

robinvdvleuten/hhmm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hhmm

Build Status Standard - JavaScript Style Guide

Convert a digit time string to milliseconds: '22:17'80220000

Installation

$ yarn add hhmm

Alternatively using npm:

$ npm install --save hhmm

Usage

const hhmm = require('hhmm')

// hours:minutes
hhmm('22:17')
//=> 80220000

// hours
hhmm('22')
//=> 79200000

// hours:minutes
hhmm('00:22')
//=> 1320000

License

MIT © Robin van der Vleuten