Browse Source

Improvement date ago pipe

pull/7911/head
Vladyslav_Prykhodko 4 years ago
parent
commit
6a0e8c03a4
  1. 15
      ui-ngx/src/app/shared/pipe/date-ago.pipe.ts

15
ui-ngx/src/app/shared/pipe/date-ago.pipe.ts

@ -15,16 +15,17 @@
///
import { Inject, Pipe, PipeTransform } from '@angular/core';
import { DAY, HOUR, MINUTE, SECOND, WEEK, YEAR } from '@shared/models/time/time.models';
import { TranslateService } from '@ngx-translate/core';
const intervals = {
years: 31536000,
months: 2592000,
weeks: 604800,
days: 86400,
hr: 3600,
min: 60,
sec: 1
years: YEAR,
months: DAY * 30,
weeks: WEEK,
days: DAY,
hr: HOUR,
min: MINUTE,
sec: SECOND
};
@Pipe({

Loading…
Cancel
Save