import { useMemo } from "react" ; import { createDateFormatter } from "coral-common/date" ; import { useUIContext } from "coral-ui/components/v2" ; export default function useDateTimeFormat ( options ) { const { locales } = useUIContext ( ) ; return useMemo ( ( ) => createDateFormatter ( locales , options ) , [ locales , options , ] ) ; }