Data JavaScript Data PHP

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