DEV Community

loading...

Discussion on: Automating the Date On Your Footer.

Collapse
0xbf profile image
Bo

The problem with this way is, now the copyright year is depending on the date in client side. If the date in client computer is misconfigured as 2016, then the copyright year will show 2016

Collapse
saviour123 profile image
Saviour Gidi Author

I've updated the article to fetch the date from worldclockapi.com if you don't trust the date from the browser, you can use that as the second option.

Collapse
0xbf profile image
Bo

Nice! I got your point, but calling API means now that part information relies on the accessibility of the API site, in this case if worldclockapi.com is down, then the year won't be shown.

I think manually change the footer year may still be the best way, given we only need to change it once a year, that's not too bad :D