Correct way to Get Current year using date_i18n
-
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 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Correct way to Get Current year using date_i18n’ is closed to new replies.