This commit is contained in:
2023-10-19 03:05:50 +07:00
parent 480cbefd74
commit 4476d9d2dc
16 changed files with 404 additions and 53 deletions

View File

@@ -0,0 +1,19 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'thaidate',
pure :true
})
export class ThaidatePipe implements PipeTransform {
transform(value: string): string {
if(!value) return '-'
let date = new Date(value).toLocaleDateString('th-TH', {
year: 'numeric',
month: 'short',
day: 'numeric',
})
return date
}
}