don't let date of toots goes beyong 60min fix #119

This commit is contained in:
Nicolas Constant 2019-06-15 14:19:19 -04:00
parent 8f540c48f8
commit 1d4c8b5dad
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 6 additions and 6 deletions

View File

@ -32,11 +32,11 @@ export class TimeAgoPipe implements PipeTransform {
// const months = days / 30.416; // const months = days / 30.416;
// const years = days / 365; // const years = days / 365;
if (seconds <= 60) { if (seconds <= 59) {
text = Math.round(seconds) + 's'; text = Math.round(seconds) + 's';
} else if (minutes <= 90) { } else if (minutes <= 59) {
text = Math.round(minutes) + 'm'; text = Math.round(minutes) + 'm';
} else if (hours <= 24) { } else if (hours <= 23) {
text = Math.round(hours) + 'h'; text = Math.round(hours) + 'h';
} else { } else {
text = Math.round(days) + 'd'; text = Math.round(days) + 'd';

View File

@ -31,11 +31,11 @@ export class TimeLeftPipe implements PipeTransform {
if (seconds < 0) { if (seconds < 0) {
text = '0 seconds left'; text = '0 seconds left';
} else if (seconds <= 60) { } else if (seconds <= 59) {
text = Math.round(seconds) + ' seconds left'; text = Math.round(seconds) + ' seconds left';
} else if (minutes <= 90) { } else if (minutes <= 59) {
text = Math.round(minutes) + ' minutes left'; text = Math.round(minutes) + ' minutes left';
} else if (hours <= 24) { } else if (hours <= 23) {
text = Math.round(hours) + ' hours left'; text = Math.round(hours) + ' hours left';
} else { } else {
text = Math.round(days) + ' days left'; text = Math.round(days) + ' days left';