Question from the Angular test

Write a pipe to format a date according to a certain pattern.

Medium

Let's take a pipe to format a date according to a certain pattern ({{ dateOfBirth | date: 'dd-MM-yyyy' }} ). Which signature would you use for this implementation?

Author: Emmanuel DemeyStatus: PublishedQuestion passed 2596 times
Edit
5
Community Evaluations
developer avatar
Auteur anonyme
29/04/2024
transform(date:Date, format:string):string { }
developer avatar
Zineb
22/05/2023
The question is too confusing
developer avatar
Auteur anonyme
05/06/2023
Can you propose an alternative that would be less confusing ?
developer avatar
Auteur anonyme
01/01/2024
Add export class dateOfBirth implements PipeTransform { at the top