How to get current date in JavaScript?

Learn how to get current date in JavaScript with this small tutorial
31 October 2017   105388

Feel free to use new Date() to generate a new Date object containing the current date and time.

var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();

if(dd<10) {
    dd = '0'+dd
} 

if(mm<10) {
    mm = '0'+mm
} 

today = mm + '/' + dd + '/' + yyyy;
document.write(today);

This will give you today's date in the format of mm/dd/yyyy.

Simply change today = mm +'/'+ dd +'/'+ yyyy; to whatever format you wish.

 

Frontend News Digest 9-15.11

Chrome will mark "fast" websites, PM2 4.2 released, Chrome Dev Summit 2019 video keynote and other interesting things
15 November 2019   218

Greetings! I hope your week went great! Here's new Python news digest.

Learn when to use SVG vs when to use canvas, how to use ffmpeg to combine many videos in one, check the results of front-end tooling survey and more.

Guides

  • When to Use SVG vs. When to Use Canvas

Learn where to use what

  • How to Use ffmpeg to Combine Multiple Videos to One 

Advice on how to combine multiple separate videos into a single one with ffmpeg.

Articles

  • Moving towards a faster web

One of the most popular web brousers is going to mark "fast" websites

  • The Front-End Tooling Survey 2019 - Results

3,000 developers took part in the survey, time to check a detailed report

  • Semantic Sidenotes for The Web

Improvement proposal for sidenotes implementation in HTML

  • A Super Weird CSS Bug That Affects Text Selection

Did you know that using a selector without any style properties can cause no styling to be applied at all? 

Updates

  • linkinator

Site crawler and broken link checker

  • PM2 4.2

The newest update for the a production process manager for Node.js applications with a built-in load balance brings a lot of new features

Video

  • Keynote (Chrome Dev Summit 2019)

  • HTML isn’t done!