JSFiddle - React, Tailwind, and code Playground
HTML
<p>Today's date format yyyy/mm/dd:</p>
<div id="date-formatted"></div>
JavaScript
jQuery(document).ready(function ($) {
var d = new Date();
var month = d.getMonth() + 1;
var day = d.getDate();
var output = d.getFullYear() + '/' + (month < 10 ? '0' : '') + month + '/' + (day < 10 ? '0' : '') + day;
$('#date-formatted').html(output);
var date = new Date();
date.setDate(date.getDate() + 7);
alert(date);
});