我知道如何获得当月的第一天,但是我如何获得回历月的第一天? 看到以下内容:
let day = new Date();
let formatedDay = new Intl.DateTimeFormat('ar-SA-u-ca-islamic-civil',
{day: 'numeric', month: 'long',weekday: 'long',year :
'numeric'}).format(new Date());
let month = day.getMonth();
let year = day.getFullYear();
let firstDay = new Date(year, month, 1);
let lastDay = new Date(year, month+ 1, 1-1);
console.log(formatedDay)
我的问题是如何将变量formatedDay实现为以下内容: 月,年,firstDay和lastDay变量?