I'm using moment.js to validate some dates and I've used the moment().weeksInYear()
function to check which week of the year we're in.
I need to make a date forecast, after the user tells me a date, I can calculate how many weeks will go by and add this to the function of the moment by increment moment().weeksInYear() + semanas
.
I need to manipulate the moment so that I figure out which Friday of the week I calculate.
example:
moment().weeksInYear() // retorna semana 52
moment().weeksInYear() + semanas // retorna 54
I need to use this 54
to know the exact date of the Friday of the week 54
of the year.