import React from 'react';
import PropTypes from 'prop-types';
import ListSeparator from '@ciscospark/react-component-list-separator';

import calculateDateText from './calculateDateText';

const propTypes = {
  fromDate: PropTypes.instanceOf(Date).isRequired,
  now: PropTypes.instanceOf(Date).isRequired,
  toDate: PropTypes.instanceOf(Date).isRequired
};

function DaySeparator({
  fromDate,
  now,
  toDate
}) {
  return (
    <div>
      <ListSeparator primaryText={calculateDateText(fromDate, now, toDate)} />
    </div>
  );
}

DaySeparator.propTypes = propTypes;

export default DaySeparator;

@@ -203,16 +203,53 @@
 pes = %7B%0A
+  // All props are moment.js objects%0A
   fromDa
@@ -262,32 +262,22 @@
 opTypes.
-instanceOf(Date)
+object
 .isRequi
@@ -298,32 +298,22 @@
 opTypes.
-instanceOf(Date)
+object
 .isRequi
@@ -341,24 +341,14 @@
 pes.
-instanceOf(Date)
+object
 .isR

add correct prop type