import eachWeekendOfInterval from '../eachWeekendOfInterval/index' ; import startOfMonth from '../startOfMonth/index' ; import endOfMonth from '../endOfMonth/index' ; import requiredArgs from '../_lib/requiredArgs/index' ; name category summary description param { Date | Number } date returns { Date [ ] } throws throws example export default function eachWeekendOfMonth ( dirtyDate ) { requiredArgs ( 1 , arguments ) ; const startDate = startOfMonth ( dirtyDate ) ; if ( isNaN ( startDate . getTime ( ) ) ) throw new RangeError ( 'The passed date is invalid' ) ; const endDate = endOfMonth ( dirtyDate ) ; return eachWeekendOfInterval ( { start : startDate , end : endDate } ) ; }