src/DateFns.js
/**
 * Initializes the passed in moment.
 * This function sets the time to the start of the day and configures the locale
 * if one is passed in
 *
 * @param {any} date
 *  Anything accepted by a moment(<value>) call
 * @param {Object} locale
 *  The locale to be used in this moment
 * @returns {moment}
 *  This initialized moment
 */
Initializes the passed in moment.
This function sets the time to the start of the day and configures the locale
if one is passed in

@param {any} date
Anything accepted by a moment() call
@param {Object} locale
The locale to be used in this moment
@returns {moment}
This initialized moment
Initializes the passed in moment . This function sets the time to the start of the day and configures the locale if one is passed in @param { any } date Anything accepted by a moment () call @param { Object } locale The locale to be used in this moment @returns { moment } This initialized moment
function initMoment(date, locale) {
  if (locale && locale.name) {
    return moment(date).startOf("day").locale(locale.name);
  } else {
    return moment(date).startOf("day");
  }
}
function initMoment ( date , locale ) { if ( locale && locale . name ) { return moment ( date ) . startOf ( "day" ) . locale ( locale . name ) ; } else { return moment ( date ) . startOf ( "day" ) ; } }
Initializes the passed in moment.
Initializes the passed in moment .