import toDate from '../toDate/index' ; import requiredArgs from '../_lib/requiredArgs/index' ; name category summary description param { Date | Number } date param { Date | Number } dateToCompare returns { Boolean } throws example export default function isBefore ( dirtyDate , dirtyDateToCompare ) { requiredArgs ( 2 , arguments ) ; const date = toDate ( dirtyDate ) ; const dateToCompare = toDate ( dirtyDateToCompare ) ; return date . getTime ( ) < dateToCompare . getTime ( ) ; }