How do I convert PHP DateTime object to Javascript Date object ?
new Date('06/18/2016') in Javascript = Date {Sat Jun 18 2016 00:00:00 GMT+0800 (SE Asia Standard Time)}
It's easy to get month, just mydate.getMonth() but it didn't work when I try to convert date from PHP
new DateTime('06/18/2016') in PHP = Object { date="2016-06-18 00:00:00", timezone_type=3, timezone="Asia/Kuala_Lumpur"} using mydate.getMonth() didn't work.
getTimestampmethod returning a timestamp which can be easily converted to JS timestamp by appending 3 zeroes.