git-date-of.js
function gitDateOf(val) {
  let date = null;

  try {
    date = exec(`git log -1 --format=%cI ${val}`).toString();
  } catch (err) {
    return new Error(err);
  }

  return date.substring(0, date.indexOf('T'));
}
function gitDateOf(val) {
  let date = null;

  try {
    date = exec(`git log -1 --format=%cI ${val}`).toString();
  } catch (err) {
    return new Error(err);
  }

  return date.substring(0, date.indexOf('T'));
}
function gitDateOf ( val ) { let date = null ; try { date = exec ( ` ${ val } ` ) . toString ( ) ; } catch ( err ) { return new Error ( err ) ; } return date . substring ( 0 , date . indexOf ( 'T' ) ) ; }
Date of a git value
@param  {string} val     Value.
@return {string}         Date.
Date of a git value