import React from 'react';
import { format as formatFns } from 'date-fns';

interface IPropsMomentString {
   date: Date; // data
   format: 'dd MM yyyy' | string; // format da data
}

export const DateString: React.FunctionComponent<IPropsMomentString> = ({ date, format }: IPropsMomentString) => {
   return <>{formatFns(date, format)}</>;
};
