I have this php:
<?php
$mytestdate = "Oct 23, 2019 20:00:00";
?>
This javascript does not give me the required output:
<script>
var mydate = "<?php echo $mytestdate; ?>";
// Set the date we're counting down to
var countDownDate = new Date(mydate).getTime();
</script>
This javascript does give me the desired output:
<script>
var mydate = "<?php echo $mytestdate; ?>";
// Set the date we're counting down to
var countDownDate = new Date("Oct 23, 2019 20:00:00").getTime();
</script>
What is going wrong?!
The output is either nothing or "NaNd NaNh NaNm NaNs".