Short: Yes. If your value wouldn’t be a date, it would just cause an error:
<?php
$d=new DateTime (" <script> malicious </script>");
#test
echo $d->format("y");
/*will cause something like
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string ( <script> malicious </script>)*/
CLICK HERE to find out more related problems solutions.