In this answer I develop JD Smith idea. I was able to shorten the JD Smith regexp
let format= d=> d.toString().replace(/\w+ (\w+) (\d+) (\d+).*/,'$2-$1-$3');_x000D_
_x000D_
console.log( format(Date()) );
_x000D_
Dave also base on JD Smith idea but he avoid regexp and give very nice solution - I short a little his solution (by change split param) and opaque it in wrapper
let format= (d,a=d.toString().split` `)=> a[2]+"-"+a[1]+"-"+a[3];_x000D_
_x000D_
console.log( format(Date()) );
_x000D_