Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ MockDate.set('1/30/2000');

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

MockDate.set('2000-11-22 11:22:33 AM'); // with time

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

MockDate.set('2000-11-22T22:11:44'); // ISO 8601 datetime

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

MockDate.set(new Date('2/20/2000'));

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