{"size": 536, "ext": "js", "max_stars_repo_path": "webapp/src/utils/validateDate.js", "max_stars_repo_name": "Hildemir/vitaes", "max_stars_repo_stars_event_min_datetime": "2019-03-22T01:30:36.000Z", "max_stars_repo_stars_event_max_datetime": "2021-10-15T23:02:58.000Z", "max_issues_repo_path": "webapp/src/utils/validateDate.js", "max_issues_repo_name": "Hildemir/vitaes", "max_issues_repo_issues_event_min_datetime": "2019-03-02T15:14:49.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T11:02:49.000Z", "max_forks_repo_path": "webapp/src/utils/validateDate.js", "max_forks_repo_name": "Hildemir/vitaes", "max_forks_repo_forks_event_min_datetime": "2019-03-02T20:37:42.000Z", "max_forks_repo_forks_event_max_datetime": "2020-10-21T21:36:45.000Z"}
{"max_stars_count": 22, "max_issues_count": 190, "max_forks_count": 14, "avg_line_length": 28.2105263158, "max_line_length": 73, "alphanum_fraction": 0.6100746269}
export default function validateDate(dateStr) {
  const date = new Date(dateStr);
  const day = Number(dateStr[8] + dateStr[9]);
  const month = Number(dateStr[5] + dateStr[6]);
  const year = Number(dateStr[0] + dateStr[1] + dateStr[2] + dateStr[3]);
  const firstSpacer = dateStr[4];
  const secondSpacer = dateStr[7];
  if (
    date.getUTCMonth() + 1 !== month
    || date.getUTCDate() !== day
    || date.getUTCFullYear() !== year
    || firstSpacer !== '-'
    || secondSpacer !== '-'
  ) {
    return false;
  }
  return true;
}
