projects/ngx-persian/src/lib/Pipes/jdate.pipe.ts
Formats JDate objects or convert Date objects (or any instance of classes those implement that interface) to a JDate
object and format
that according to the given format.
The result of this pipe is not reevaluated when the input is mutated. To avoid the need to reformat the date on every change-detection cycle, treat the date as an immutable object and change the reference when the pipe needs to run again.
You can pass a format pattern string like JDate format method
Also you can use pre-defined format names described below:
Default format is medium
.
Name | jdate |
Private Static convertNameToFormat | ||||||
convertNameToFormat(formatName)
|
||||||
Checks if
Parameters :
Returns :
string
formatting pattern string |
transform | |||||||||||||||
transform(value: Date, format: string)
|
|||||||||||||||
Formatting the date using
Parameters :
Returns :
string
|