In this article we will show you how to display the current year in the footer section of your website.
If you have a website, you certainly have an area dedicated to copyright, somewhere at the bottom of the page. It may happen that the year, that is shown there, does not take into account the current date. In this case, every new year, you will have to adjust this year manually.
In fact, there is a much better approach, which enables you to manage the current year automatically, adjusting itself to the system's date.
Depending on the technology used, there are three most common ways to do so:
2 - PHP
<?php echo date('Y'); ?>
3 - ASP.NET
<%= DateTime.Now.Year.ToString() %>