import comparePiecesToDate from '../helpers/comparePiecesToDate' ; import mapToPieces from '../helpers/mapToPieces' ; /**
 * Pattern to match brazilian formatted dates (99/99/9999).
 */ const DATE_PATTERN = /^\d{2}\/\d{2}\/\d{4}((\s)?(\d{2}:\d{2}:\d{2}))?$/ ; example param value const isDate = ( value ) : boolean => DATE_PATTERN . test ( value ) && comparePiecesToDate ( mapToPieces ( value ) ) ; export default isDate ;