Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Commit

Permalink
Updated test and readme to reflect changes made to case 'is date'
Browse files Browse the repository at this point in the history
  • Loading branch information
Samrith Shankar committed Jun 1, 2017
1 parent 8a3354f commit 8b08b7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ console.log(relativeDate(moment().subtract(Math.floor(Math.random() * 6) + 2, 'd
//Output: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday

console.log(relativeDate(moment(new Date()).subtract(8, 'd')).text);
//Output: 5/21/2017
//Output: 21 May, 2017

console.log(relativeDate(moment().add(100, 'y')).text);
//Output: 100 years from now
Expand Down Expand Up @@ -60,20 +60,21 @@ There is an `.editorconfig` to maintain indentation across editors. Feel free to

## Feature roadmap
- Customizable format for case 'Date is today'
- Customizable format for case 'Date is a parsed date of format M/D/YYYY'
- Customizable format for case 'Date is a parsed date of format D MMM, YYYY'
- Customizable format for case 'Date is from the future'
- Additional sub-cases for 'Date is today'
- Option to show texts like, 'a few seconds ago', '1 minute ago', '7 hours ago' etc.
- Option to show texts like, 'just now', 'about a minute', etc.

## Release History
- 1.0.10 - Updated tests and changed README to reflect changes made to case 'is parsed date'
- 1.0.9 - Changed default 'is date' format from `M/DD/YYYY` to `D MMM, YYYY`
- 1.0.8 - Fixed issue with Uglifier throwing error `unexpected token name`
- 1.0.7 - Rectified test case 3 failing when randomiser subtracts day by 1. Changed the randomisation formula to generate number between 6 and 2
- 1.0.6 - Completed comprehensive readme.
- 1.0.5 - Added returned object structure in readme.
- 1.0.6 - Completed comprehensive README.
- 1.0.5 - Added returned object structure in README.
- 1.0.4 - Added feature roadmap.
- 1.0.3 - Changed license of NPM package to MIT.
- 1.0.2 - Completed readme.
- 1.0.2 - Completed README.
- 1.0.1 - Added `.editorconfig`.
- 1.0.0 - Initial release.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "relative_date",
"version": "1.0.9",
"version": "1.0.10",
"description": "A tiny package which, when given a date, displays it with relation to the current day.",
"main": "relative_date.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const tests = {
1: 'Date is today',
2: 'Date is yesterday',
3: 'Date is a day',
4: 'Date is a parsed date of format M/D/YYYY',
4: 'Date is a parsed date of format D MMM, YYYY',
5: 'Date is from the future',
6: 'Date is invalid'
}
Expand Down

0 comments on commit 8b08b7f

Please sign in to comment.