As mentioned in the title, I have a week number and a year value. Is there a way of finding Monday of that week using moment.js? Was trying, but not succeeded
$(document). ready(function(){ var weeknumber = moment("12-25-1995", "MM-DD-YYYY"). week(); console. log(weeknumber); });
This is a pretty robust function for adding time to an existing moment. To add time, pass the key of what time you want to add, and the amount you want to add. moment(). add(7, 'days');
Moment construction falls back to js Date. This is discouraged and will be removed in an upcoming major release. This deprecation warning is thrown when no known format is found for a date passed into the string constructor.
Sorry found solution myself:
var test = moment().day("Monday").week(week number here);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With