Skip to content

Commit

Permalink
Merge pull request #13 from kadirahq/fix-7
Browse files Browse the repository at this point in the history
Remove full date #7
  • Loading branch information
arunoda authored Oct 7, 2016
2 parents a01333d + 87a2046 commit f76f3c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
"@kadira/storybook-addons": "^1.5.0",
"react": "^0.14.7 || ^15.0.0",
"react-dom": "^0.14.7 || ^15.0.0"
},
"dependencies": {
"moment": "^2.15.1"
}
}
3 changes: 2 additions & 1 deletion src/manager/components/CommentList/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import moment from 'moment';
import style from './style';

export default class CommentList extends Component {
Expand Down Expand Up @@ -29,7 +30,7 @@ export default class CommentList extends Component {
}

formatTime(ts) {
return new Date(ts).toLocaleString();
return moment(new Date(ts), "YYYYMMDD").fromNow();
}

renderComment(comment, key) {
Expand Down

0 comments on commit f76f3c7

Please sign in to comment.