Today date

var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var today = d.getFullYear() + '-' + (month<10 ? '0' : '') + month + '-' + (day<10 ? '0' : '') + day;
A very simple way to be in date.

1 Response

You could also use

if you just want this formatting

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.