Current Date : 2019-10-14
I try like this :
var b = new Date()
var c = new Date(b.setMonth(b.getMonth() + 3));
c = c.toISOString().substr(0, 10)
console.log(c)
The result : 2020-01-14
But I want maximum date is last date on the third month. That is 2019-12-31
How can I do it?
Update
For example :
Current Date : 2019-11-03, then the result is 2020-01-31
Current Date : 2020-01-09, then the result is 2020-03-31