fix(FE) : card list antrean
This commit is contained in:
@@ -253,3 +253,12 @@ export function truncate(
|
||||
|
||||
return value.substring(0, length) + suffix;
|
||||
}
|
||||
|
||||
export function formatDate(date: string | Date | null | undefined, options?: Intl.DateTimeFormatOptions): string {
|
||||
if (!date) return '-';
|
||||
return new Date(date).toLocaleDateString('id-ID', {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric'
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user