code: function weekday(year, month, day) {
        if(month < 1 || month > 12) {
          throw new IllegalMonthError();
        }
  
        if(day < 1 || day > (_DAYS_IN_MONTH[month] + (month === 2 && isleap(year)))) {
          throw new IllegalDayError();
        }
  
        var date = new Date(year, month - 1, day);
        return _adjustWeekday(date.getDay());
      }
docs: Return weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12),
  day (1-31).
  
  @param {Number} year
  @param {Number} month
  @param {Number} day
  @throws {IllegalMonthError} If the provided month element is invalid.
  @throws {IllegalDayError} If the provided day element is invalid.
  @api public