src/Axes.js
function getDatetimeUnit(min, max) {
  const diff = max.diff(min, 'days');
  let unit = 'month';
  if (diff <= 14) {
    unit = 'day';
  } else if (diff > 14 && diff <= 183) {
    unit = 'week';
  }
  return unit;
}
function getDatetimeUnit(min, max) {
  const diff = max.diff(min, 'days');
  let unit = 'month';
  if (diff <= 14) {
    unit = 'day';
  } else if (diff > 14 && diff <= 183) {
    unit = 'week';
  }
  return unit;
}
function getDatetimeUnit ( min , max ) { const diff = max . diff ( min , 'days' ) ; let unit = 'month' ; if ( diff <= 14 ) { unit = 'day' ; } else if ( diff > 14 && diff <= 183 ) { unit = 'week' ; } return unit ; }
getDatetimeUnit - determine the unit of time for padding the axis

@param {object} min, the min moment datetime object
@param {object} max, the max moment datetime object
@return {string} the datetime unit {day, week, month}
getDatetimeUnit - determine the unit of time for padding the axis