index.js 499 B

12345678910111213141516171819202122
  1. var parse = require('../parse/index.js')
  2. /**
  3. * @category Weekday Helpers
  4. * @summary Is the given date Wednesday?
  5. *
  6. * @description
  7. * Is the given date Wednesday?
  8. *
  9. * @param {Date|String|Number} date - the date to check
  10. * @returns {Boolean} the date is Wednesday
  11. *
  12. * @example
  13. * // Is 24 September 2014 Wednesday?
  14. * var result = isWednesday(new Date(2014, 8, 24))
  15. * //=> true
  16. */
  17. function isWednesday (dirtyDate) {
  18. return parse(dirtyDate).getDay() === 3
  19. }
  20. module.exports = isWednesday