Home Add Automatic Copyright Year With PHP

    Add Automatic Copyright Year With PHP


    Virtually every website has a copyright icon and string indicating the years of website operation. It’s surprising how many sites still use a single static date that doesn’t reflect the years the site has existed. The following function is designed to return the date of website origin through to the current year.

    Returns: © 2012 – 2017.

    Of course, you can return the current year with just the following:

    The from and to date can be returned with the following (the only difference to the function above is that it doesn’t correct if the start and current year are the same).

    Short URL for this post: http://shor.tt/1XHa