Skip to content

googoid/chai-date-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chai-date-string

Usage example:

var chai = require('chai')
  , expect = chai.expect
  , chaiDateString = require('chai-date-string');

expect('2015-11-12').to.be.a.dateString(); // will pass
expect('2015-24-12').to.be.a.dateString(); // will fail

It will validate time part as well.

The later will fail with message: AssertionError: expected '2015-24-12' to be a date string.

About

Validates a string to have valid date format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published