regex-iso-date

Regular expression for ISO date

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
regex-iso-date
1201.0.08 years ago8 years agoMinified + gzip package size for regex-iso-date in KB

Readme

regex-iso-date
!NPM versionnpm-imagenpm-url !build statustravis-imagetravis-url !Test coveragecoveralls-imagecoveralls-url !Downloadsdownloads-imagedownloads-url
Regular expression for ISO date.

Installation

npm install regex-iso-date

Usage

var regex = require('regex-iso-date');

regex().test('2011-10-05T14:48:00.000Z');
// => true

var match = regex().exec('2011-10-05T14:48:00.000Z');
match[0] // => '2011-10-05T14:48:00.000Z'
match[1] // => '2011'
match[2] // => '10'
match[3] // => '05'
match[4] // => '14:48:00'
match[5] // => '14'
match[6] // => '48'
match[7] // => '00'
match[8] // => '000'

Contributors

See Also

License

MIT