create a function in javascript to extract previous 3 months and number of days given input current date and month code example
Example: get current month of year in number javascript
var today = new Date();
var month = today.getMonth(); // Returns 9
console.log(month); // Output: 9