Happy echo date(‘Y’)

It’s at times like these that I am very happy I declare copyright notices on the sites I manage using the php method for echoing the year.

Copyright © 

Saves a lot of time and panic after noticing a site you built years ago looks somewhat out of date.

Update: via Maarten Jacobs (@MaartenJJ) it’s a good idea to set the timezone to ensure it displays correctly for the users location via date_default_ timezone_set(). Thanks Maarten

arbitrarily assigned to Code

Leave a Reply


Webmentions

No webmentions found.