Open the back cover & remove the battery.
Look at the big sticker that reads the Model, IMEI & relevant info.
Take a look at the serial number. The first three numbers represent the Year & the Month.
For example, in the above image, the serial number starts with 505, which means 2015 - 05 (May)
You need to avoid numbers upto 508. You’re mostly safe with going with 509 & above. Getting a 601+ one is highly recommendable. (2016 - Jan & above).
Sometimes the number doesn’t start with the date, it might start with some letters & then the number, so you have to pay attention to find the date code.
Hope this helped.