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!