diff --git a/packages/util/date-time/time.ts b/packages/util/date-time/time.ts index 03de489435..1b3d40e5db 100644 --- a/packages/util/date-time/time.ts +++ b/packages/util/date-time/time.ts @@ -139,5 +139,7 @@ export function formatDate( if (isNaN(value as NzSafeAny)) return ''; const langOpt = { locale: options?.locale }; - return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt); + return formatString === 'fn' + ? formatDistanceToNow(value, langOpt) + : (options?.customFormat ?? format)(value, formatString, langOpt); }