<commit_before># chai-datetime

Matchers for chai to help with common date equality assertions against
JavaScript Date objects.

## Why?

Comparing date objects in JavaScript is not based on value, which
requires you to call getTime() to ensure the values match. These
matchers remove the need to do that. Additionally when comparing
getTime() values with the standard chai equality matcher you don't get
very readable output because you're comparing epoch seconds.

## Usage

### Browser

```html
<script src="chai.js"></script>
<script src="chai-datetime.js"></script>
```

### Server

```javascript
var chai = require('chai');<commit_msg>Add TravisCI badge to README<commit_after># chai-datetime

Matchers for chai to help with common date equality assertions against
JavaScript Date objects.

[![Build Status](https://travis-ci.org/gaslight/chai-datetime.png?branch=master)](https://travis-ci.org/gaslight/chai-datetime)

## Why?

Comparing date objects in JavaScript is not based on value, which
requires you to call getTime() to ensure the values match. These
matchers remove the need to do that. Additionally when comparing
getTime() values with the standard chai equality matcher you don't get
very readable output because you're comparing epoch seconds.

## Usage

### Browser

```html
<script src="chai.js"></script>
<script src="chai-datetime.js"></script>
```

### Server

```javascript
var chai = require('chai');
{'fraction_non_alphanumeric': 0.10518934081346423, 'fraction_numerical': 0.0, 'mean_word_length': 5.2314410480349345, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5020763', 'n_tokens_mistral': 413, 'n_tokens_neox': 389, 'n_words': 165}