don't let date of toots goes beyong 60min fix #119
This commit is contained in:
parent
8f540c48f8
commit
1d4c8b5dad
|
@ -32,11 +32,11 @@ export class TimeAgoPipe implements PipeTransform {
|
|||
// const months = days / 30.416;
|
||||
// const years = days / 365;
|
||||
|
||||
if (seconds <= 60) {
|
||||
if (seconds <= 59) {
|
||||
text = Math.round(seconds) + 's';
|
||||
} else if (minutes <= 90) {
|
||||
} else if (minutes <= 59) {
|
||||
text = Math.round(minutes) + 'm';
|
||||
} else if (hours <= 24) {
|
||||
} else if (hours <= 23) {
|
||||
text = Math.round(hours) + 'h';
|
||||
} else {
|
||||
text = Math.round(days) + 'd';
|
||||
|
|
|
@ -31,11 +31,11 @@ export class TimeLeftPipe implements PipeTransform {
|
|||
|
||||
if (seconds < 0) {
|
||||
text = '0 seconds left';
|
||||
} else if (seconds <= 60) {
|
||||
} else if (seconds <= 59) {
|
||||
text = Math.round(seconds) + ' seconds left';
|
||||
} else if (minutes <= 90) {
|
||||
} else if (minutes <= 59) {
|
||||
text = Math.round(minutes) + ' minutes left';
|
||||
} else if (hours <= 24) {
|
||||
} else if (hours <= 23) {
|
||||
text = Math.round(hours) + ' hours left';
|
||||
} else {
|
||||
text = Math.round(days) + ' days left';
|
||||
|
|
Loading…
Reference in New Issue