Improvement date ago pipe
This commit is contained in:
parent
3bbf69c894
commit
6a0e8c03a4
@ -15,16 +15,17 @@
|
|||||||
///
|
///
|
||||||
|
|
||||||
import { Inject, Pipe, PipeTransform } from '@angular/core';
|
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';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
const intervals = {
|
const intervals = {
|
||||||
years: 31536000,
|
years: YEAR,
|
||||||
months: 2592000,
|
months: DAY * 30,
|
||||||
weeks: 604800,
|
weeks: WEEK,
|
||||||
days: 86400,
|
days: DAY,
|
||||||
hr: 3600,
|
hr: HOUR,
|
||||||
min: 60,
|
min: MINUTE,
|
||||||
sec: 1
|
sec: SECOND
|
||||||
};
|
};
|
||||||
|
|
||||||
@Pipe({
|
@Pipe({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user