javascript date to php дата

<?php
$jsDateTS = strtotime($jsDate);
if ($jsDateTS !== false) date('Y-m-d', $jsDateTS);
else echo "Invalid Date Format"
?>
Undefined