I need to get todays date in dd-mon-yyyy in jquery/javascript.
I managed to get the date in dd-mm-yyyy format.
function strpad00(s)
{
s = s + '';
if (s.length === 1) s = '0' + s;
return s;
}
var now = new Date();
var processDate = strpad00(now.getDate()) + "-"
+ strpad00(now.getMonth() + 1) + "-" + now.getFullYear();
console.log(processDate);
Can you please help me as how can I get the date format in dd-mon-yyyy format?
This is not a duplicate question because, the answers suggest ways to get the format as 'DD-MM-YYYY' and not 'DD-Mon-YYYY' Please unmark it from being duplicate.