diff options
Diffstat (limited to 'client/src/app/shared/angular')
-rw-r--r-- | client/src/app/shared/angular/from-now.pipe.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/app/shared/angular/from-now.pipe.ts b/client/src/app/shared/angular/from-now.pipe.ts index 07f114ab6..9851468ee 100644 --- a/client/src/app/shared/angular/from-now.pipe.ts +++ b/client/src/app/shared/angular/from-now.pipe.ts | |||
@@ -10,7 +10,7 @@ export class FromNowPipe implements PipeTransform { | |||
10 | transform (arg: number | Date | string) { | 10 | transform (arg: number | Date | string) { |
11 | const argDate = new Date(arg) | 11 | const argDate = new Date(arg) |
12 | const seconds = Math.floor((Date.now() - argDate.getTime()) / 1000) | 12 | const seconds = Math.floor((Date.now() - argDate.getTime()) / 1000) |
13 | 13 | ||
14 | let interval = Math.floor(seconds / 31536000) | 14 | let interval = Math.floor(seconds / 31536000) |
15 | if (interval > 1) return this.i18n('{{interval}} years ago', { interval }) | 15 | if (interval > 1) return this.i18n('{{interval}} years ago', { interval }) |
16 | if (interval === 1) return this.i18n('{{interval}} year ago', { interval }) | 16 | if (interval === 1) return this.i18n('{{interval}} year ago', { interval }) |