Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Judge 24 hours correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Mar 20, 2016
1 parent ca42935 commit 9e5ab2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export default class Time extends React.Component {
}

getAbsoluteTime() {
return this.getMomentTime().format('YYYY-MM-DD HH:mm');
return this.getMomentTime().format('YYYY/MM/DD');
}

getDisplayedTime() {
if (this.getMomentTime().isBefore(moment.duration(24, 'hours'))) {
if (this.getMomentTime().isBefore(moment().subtract(1, 'day'))) {
return this.getAbsoluteTime();
} else {
return this.getRelativeTime();
Expand Down
2 changes: 1 addition & 1 deletion src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ body {
.name_wrapper {
float: left;
white-space: nowrap;
width: calc(100% - #{$icon_size + 40px});
width: calc(100% - #{$icon_size + 10px});
overflow: hidden;
text-overflow: ellipsis;
color: $grey;
Expand Down

0 comments on commit 9e5ab2d

Please sign in to comment.