is-october
Version:
returns a 'true' boolean if date is october
19 lines (15 loc) • 413 B
JavaScript
/*!
* is-october <https://github.com/TJC-js/is-october>
*
* 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 isOctober(value) {
if(!isDate(value)){
throw new Error('expected a date');
}
return value.getMonth() == month.October;
};