There are probably a couple of ways you could do it, but one option would be to use something like:
$WADbSearch1->addComparison("date","".isset($_GET['year']?"1/1/".$_GET['year']:"") ."","AND",">=",2);
$WADbSearch1->addComparison("date","".isset($_GET['year']?"12/31/".$_GET['year']:"") ."","AND","<=",2);
and then just pass the ?year=2017 or whatever year in the url. You would want to also update the if statement of the filter to:
if (isset($_GET['year'])) {