import DateTimePieces from '../models/DateTimePieces' ; import parsePiecesToDate from './parsePiecesToDate' ; param pieces param instance const comparePiecesToDate = ( pieces , instance = parsePiecesToDate ( pieces ) ) : boolean => ( instance . getDate ( ) === pieces . date && instance . getMonth ( ) === pieces . month && instance . getFullYear ( ) === pieces . year && instance . getHours ( ) === pieces . hours && instance . getMinutes ( ) === pieces . minutes && instance . getSeconds ( ) === pieces . seconds ) ; export default comparePiecesToDate ;