JSFiddle - React, Tailwind, and code Playground

by Bikram Shrestha

HTML

<a href="https://google.co.uk/">Book Now</a>
<a href="https://google.com/">Test Link</a>
<a href="https://google.ez/">Demo Link</a>
<a href="http://www.google.com">GOOGLE</a>

JavaScript

jQuery('a[href*="google.com"]').attr('href', function(i,href) {
	    //jquery date addition
       	var requiredDate = new Date();
		var numberOfDaysToAdd = 60;
		requiredDate.setDate(requiredDate.getDate() + numberOfDaysToAdd); 
		//var convertedDate  = requiredDate.format('d-M-Y');
		//var newDate = datepicker.formatDate('yy/mm/dd', requiredDate );
		//console.log(requiredDate);

		var month 	= requiredDate.getMonth()+1;
		var day 	= requiredDate.getDate();

		var output = requiredDate.getFullYear() + '/' + ((''+month).length<2 ? '0' : '') + month + '/' + ((''+day).length<2 ? '0' : '') + day;
		//alert(output);

       	this.href += '&arrive='+output;
	});