Javascript 使用Intl.DateTimeFormat的日期格式为MM/DD/YYYY

Javascript 使用Intl.DateTimeFormat的日期格式为MM/DD/YYYY,javascript,reactjs,datetime-format,Javascript,Reactjs,Datetime Format,我希望日期格式为MM/DD/YYYY,并且我正在使用 产出:2012年6月20日 我需要的输出是2012年6月20日 我应该做什么更改才能得到预期的结果?提供对象: console.lognew Intl.DateTimeFormat'en-US',{月份:'2位',日期:'2位',年份:'numeric'}.formatnew Date 提供对象: console.lognew Intl.DateTimeFormat'en-US',{月份:'2位',日期:'2位',年份:'numeric'

我希望日期格式为MM/DD/YYYY,并且我正在使用

产出:2012年6月20日

我需要的输出是2012年6月20日

我应该做什么更改才能得到预期的结果?

提供对象:

console.lognew Intl.DateTimeFormat'en-US',{月份:'2位',日期:'2位',年份:'numeric'}.formatnew Date 提供对象:


console.lognew Intl.DateTimeFormat'en-US',{月份:'2位',日期:'2位',年份:'numeric'}.formatnew Date;你迟到了6天;你迟到了6天;这不使用Intl.DateTimeFormat?这是故意的吗?这不使用Intl.DateTimeFormat?这是故意的吗?
console.log(new Intl.DateTimeFormat('en-US').format(date));
let today = new Date().toISOString().split('T')[0];