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