JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://rawgit.com/eu81273/jsfiddle-console/master/console.js"></script>
JavaScript
var monthNames = ['January','February','March','April','May','June','July','August','September','October','November','December'];
console.log(monthNames[new Date().getMonth()].toString().substr(0, 3) + '-' + new Date().getFullYear().toString().substr(-2));
console.log(monthNames[new Date().getMonth()+1].toString().substr(0, 3) + '-' + new Date().getFullYear().toString().substr(-2));
console.log(monthNames[new Date().getMonth()+2].toString().substr(0, 3) + '-' + new Date().getFullYear().toString().substr(-2));
console.log(monthNames[new Date().getMonth()+3].toString().substr(0, 3) + '-' + new Date().getFullYear().toString().substr(-2));
console.log('Suppose if the current month is Dec-19 then what should I do? It should return next line as Jan-20 but it is not doing so')