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

interface IPropsMomentString extends React.ComponentProps<any> {
   date: Date;
   format: string;
}

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