Skip to content

Instantly share code, notes, and snippets.

@ma-9
Created November 4, 2019 07:45
Show Gist options
  • Save ma-9/910cd777aa5a15a24ccfa004b87763ac to your computer and use it in GitHub Desktop.
Save ma-9/910cd777aa5a15a24ccfa004b87763ac to your computer and use it in GitHub Desktop.
Get Date in dd//mm/yyyy format
const myDate = new Date().getUTCDate();
const myMonth = new Date().getUTCMonth()+1;
const myYear = new Date().getUTCFullYear();
const date = myDate.toString()
const month = myMonth.toString()
const year = myYear.toString()
console.log(date + "-" + month + "-" + year)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment