Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

mikeill on "Correct way to Get Current year using date_i18n"

$
0
0

This seems to work, but I'd love input as wo whether or not it's the right way to do it.

strftime('%G', strtotime(date_i18n('Y-m-d')))

Simply using date_i18n('Y') was working up until today, when it returned 2014 as opposed to 2015. And apparently we are in week 1 of 2015 according to UNIX? php?

Thanks and Happy New Year.


Viewing all articles
Browse latest Browse all 8245

Trending Articles