1.0.2 • Published 7 years ago

moment-dayinfo v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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));