isThursday.cjs 622 B

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. exports.isThursday = isThursday;
  3. var _index = require("./toDate.cjs");
  4. /**
  5. * The {@link isThursday} function options.
  6. */
  7. /**
  8. * @name isThursday
  9. * @category Weekday Helpers
  10. * @summary Is the given date Thursday?
  11. *
  12. * @description
  13. * Is the given date Thursday?
  14. *
  15. * @param date - The date to check
  16. * @param options - An object with options
  17. *
  18. * @returns The date is Thursday
  19. *
  20. * @example
  21. * // Is 25 September 2014 Thursday?
  22. * const result = isThursday(new Date(2014, 8, 25))
  23. * //=> true
  24. */
  25. function isThursday(date, options) {
  26. return (0, _index.toDate)(date, options?.in).getDay() === 4;
  27. }