Returning $date

Maybe this fixes the error?