dateDiff = (d1, d2) => {
  const date1 = new Date(d1);
  const date2 = new Date(d2);
  const diff = date1.getTime() - date2.getTime();
  return Math.round(diff / (1000 * 60));
}
Get diff in minutes between two dates.

@param {Date} d1 First date.
@param {Date} d2 Second date.
@returns {number} Number of minutes between the two dates.