Ah. The $output.trim() makes sense now. We could do it with the date also.