Web development basic and advance tutorial, php basic tutorial, laravel basic tutorial, React Native tutorial

Thursday, February 23, 2023

React JS how to add some day with current date

0 comments

React JS how to add some day with current date


let startdate = moment(new Date()).format("YYYY-MM-DD");
var new_date = moment(startdate, "DD-MM-YYYY").add('days', 10);
var day = new_date.format('DD');
var month = new_date.format('MM');
var year = new_date.format('YYYY');
let Expairday = year + '-' + month + '-' + day;
alert(startdate + '----dddd----' + Expairday)




No comments:

Post a Comment