How to show date dynamically with JavaScript - Brown Surfing

How to show date dynamically with JavaScript

Posted on: August 10th, 2022
By: Efrain Lemus

document.write(new Date().getFullYear());

The example below shows the year which is great for the copyright on a website.

The example below shows the full date with the time and timezone of the person viewing.

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published.