isTimes.js 286 B

123456789
  1. export function isTime(time1,time2){
  2. var time = Date.parse( new Date());
  3. var date1 = Date.parse(new Date(time1.replace(/-/g, '/')));
  4. var date2 = Date.parse(new Date(time2.replace(/-/g, '/')));
  5. if (date1<time&&date2>time) {
  6. return true;
  7. };
  8. return false;
  9. }