You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/pipes/OmbiDatePipe.ts

18 lines
411 B

import { Pipe, PipeTransform } from "@angular/core";
import { FormatPipe } from 'ngx-date-fns';
@Pipe({
name: "ombiDate",
})
export class OmbiDatePipe implements PipeTransform {
constructor(
private FormatPipe: FormatPipe,
) {}
public transform(value: string, format: string ) {
const date = new Date(value);
return this.FormatPipe.transform(date, format);
}
}