I tried to format my date:
var startdate = new Date(someDate).toLocaleDateString('en-GB', {
year: 'numeric',
month: 'short',
day: 'numeric'
}).split(' ').join('-');
and I console.log it appear:
3-Mar-2016
which is exactly what I want. But what appear in html when I {{someDate}} or {{someDate.toString()}} it become:
Thu Mar 03 2016 00:00:00 GMT+0800 (MYT)
How to resolve this?