Fix for creating manual entries

This commit is contained in:
Jose Alberto Hernandez
2022-05-25 20:22:10 -05:00
parent 01abdde8ab
commit d48c223cba
9 changed files with 54 additions and 90 deletions
+23
View File
@@ -0,0 +1,23 @@
import { DatePipe } from '@angular/common';
import { Injectable } from '@angular/core';
import { SettingsService } from 'app/settings/settings.service';
@Injectable({
providedIn: 'root'
})
export class Dates {
constructor(private settingsService: SettingsService,
private datePipe: DatePipe) {}
public getDate(timestamp: any) {
const dateFormat = this.settingsService.dateFormat;
return this.datePipe.transform(timestamp, dateFormat);
}
public formatDate(timestamp: any, dateFormat: string) {
return this.datePipe.transform(timestamp, dateFormat);
}
}