moment-dayinfo
v1.0.2
Published
the moment plugin for calculate the target day's info or month's info
Downloads
2
Readme
This plugin is used to calculate the target day or month's info.
More detail: blog
moment.setFirstDay(1);
console.log("当月总周数:", moment.totalOfWeekOfMonth('2026-02-01'));
console.log("当日为第几周:", moment.weekOfMonth('2026-02-02'));
console.log("当日为第几个星期几:", moment.numOfDayOfWeek('2026-02-02'));
console.log("当月第几个星期几是几号:", moment.dateOfNumOfDayOfWeek('2026-02', 0, 1));