我想检查给定的日期是月份中的第一个、第二个、第三个、第四个或最后一个星期一、星期二、星期三、…、星期日。if(checkdate(date, "second", "monday")) alert("This is the second monday of the month");else alert("This is NOT the second monday of the month");
这是我第一次使用Moment.js。我尝试检索一周的第一天的日期,而在欧洲这通常是星期一。无论我做什么,我都会因为一周的第一天而得到星期天。dow : 1, // Monday is the first day of the week.因此,当我请求一周的第一天时,我应该得到星期一的日期,对吗?我一直将周日作为输出。可以成功地使用语言文件,但