Przejdź do głównej zawartości

Function: useFormatDate()

useFormatDate(): (date, localeOverride?) => string

Memoised formatDate bound to the active language from <StorefrontProvider>.

Returns​

(date, localeOverride?) => string

Example​

const formatDate = useFormatDate();
return <span>{formatDate(order.processedAt)}</span>;