Update date_helper.php

optimized the code, replace 2 nested if with a single if along with &&.
removed blank lines and unnecessary tabs.