1let dateObj = new Date();
2
3let myDate = (dateObj.getUTCFullYear()) + "/" + (dateObj.getMonth() + 1)+ "/" + (dateObj.getUTCDate());
1const event = new Date('2021-09-07');
2
3const options = { year: 'numeric', month: 'long' };
4
5console.log(event.toLocaleDateString('de-DE', options));
6// expected output: September 2021
7
8console.log(event.toLocaleDateString('ja-JP', options));
9// expected output: 2021年9月