I'm trying to generate date by year, week and day number ie
let date = moment().year(2019).isoWeek(1).isoWeekday(1).toDate();
//Mon Dec 31 2018 11:56:45 GMT+0100 (Central European Standard Time)
the problem i'm facing when i want to get year and week from this generated date
moment(date).year() //2018
moment(date).isoWeek() // 1
NOT SURE HOW TO SOLVE THIS
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.