{"size": 313, "ext": "js", "max_stars_repo_path": "src/js/utils/dates/isFirstWeek.js", "max_stars_repo_name": "tannerkozlowski/react-design-architect", "max_stars_repo_stars_event_min_datetime": "2020-03-20T10:02:27.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-20T10:02:27.000Z", "max_issues_repo_path": "src/js/utils/dates/isFirstWeek.js", "max_issues_repo_name": "tannerkozlowski/react-design-architect", "max_issues_repo_issues_event_min_datetime": "2020-09-07T22:43:33.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-08T23:11:59.000Z", "max_forks_repo_path": "src/js/utils/dates/isFirstWeek.js", "max_forks_repo_name": "tannerkozlowski/react-design-architect", "max_forks_repo_forks_event_min_datetime": "2019-03-28T02:46:17.000Z", "max_forks_repo_forks_event_max_datetime": "2019-03-28T02:46:17.000Z"}
{"max_stars_count": 1, "max_issues_count": 40, "max_forks_count": 1, "avg_line_length": 26.0833333333, "max_line_length": 67, "alphanum_fraction": 0.7028753994}
import getWeekNumber from './getWeekNumber';

/**
 * Checks if a provided date is within the first week of its month.
 *
 * @param {Date} date - the date to check
 * @return {boolean} true if the date is within the first week.
 */
export default function isFirstWeek(date) {
  return getWeekNumber(date) === 1;
}
