Better auto updating copyright date

At the start of every year, there always seem to be several blog posts about how to automatically update the copyright date in the footer of your site. These all seem to rely on using the date function in PHP to output the current year. Although this works fine in most cases, it falls apart if in the first year you want it to say just 2012, but next year you want it to say 2012-2013 instead of just 2013. If we wrap this logic up in a function, it will be able to automatically display either just the single,…