Tip: Dynamically display Year from entries not from this year
EE Insider contributor Erik Reagan submitted a tip to the EE Insider Tips section of the site about displaying years for entries not from this year:
I personally hate going to blog sites and not knowing when an article was published. I often see ‘June 2’ but no year. Sometimes I’m actually interested in whether or not that means this June 2nd or last June second, or even a June from years ago.
Erik posted a simple code snippet to check for the date and then display the year if isn’t the current year. Be sure to read the entire tip for all of the info.
If you want to submit your own tips, head over to the EE Insider Tips section of the site and share your EE knowledge with the community. Submitting a tip requires a free account but also enables you to save tips by marking them as “helpful” and monitor comments on your own tips.