Format date from YYYYMMDD to YYMMDD in Javascript
I have this code which shows the year in YYYYMMDD format. I would like the output to be in YYMMDD format. Basically to replace 2014 to 14 only. let date = new Date(); let timeNow = new Date(date.valueOf()-60*1000*date.getTimezoneOffset()).toISOString().substring(0, 10).replace(/-/g,""); console.log(timeNow);…