Thursday, June 23, 2022

Get current date in JavaScript in String

Get current date in JavaScript in String with your desire format:

function currentDate() {
  var today = new Date();
  var dd = String(today.getDate()).padStart(2, '0');
  var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
  var yyyy = today.getFullYear();

  today = mm + '/' + dd + '/' + yyyy;
return today;
}

Switch PHP version in Ubuntu OS or Zorin OS

First check where is installed your PHP by the below command: $ which php See PHP version by below command: $ php -v As I've installed P...