Skip to content

Commit

Permalink
Documented the creation of the new Date object, added ISO format to t…
Browse files Browse the repository at this point in the history
…he readme
  • Loading branch information
TomGB committed Oct 16, 2018
1 parent 320fdb1 commit 7f862f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -38,7 +38,7 @@ The `Date` to be returned when no parameters are passed to `new Date()`. Suppor

__date__: __`String`__

The string representation of the `Date` to be returned when no parameters are passed to `new Date()`.
The string representation of the date which is passed to the `new Date()` constructor. This creates the `Date` to be returned when no parameters are passed to `new Date()`.

__date__: __`Number`__

Expand All @@ -58,6 +58,10 @@ Will restore the original `Date` object back to the native implementation.

## Example ##
```javascript
MockDate.set('2000-11-22');

new Date().toString() // "Wed Nov 22 2000 00:00:00 GMT-0600 (CST)"

MockDate.set('1/30/2000');

new Date().toString() // "Sun Jan 30 2000 00:00:00 GMT-0600 (CST)"
Expand Down

0 comments on commit 7f862f4

Please sign in to comment.