is-may
Version:
returns a 'true' boolean if date is may
19 lines (15 loc) • 397 B
JavaScript
/*!
* is-may <https://github.com/TJC-js/is-may>
*
* Copyright (c) 2021-current, Tim Cane.
* Released under the MIT License.
*/
;
var isDate = require("is-a-date");
var month = require("month-enum");
module.exports = function isMay(value) {
if(!isDate(value)){
throw new Error('expected a date');
}
return value.getMonth() == month.May;
};