The shelf life of most food products depends on the storage conditions. Most shelf life lists, best-by dates, or expiration dates are educated guesses based on expert testing and average storage and handling conditions, which may or may not apply in every case.
For pantry items such as oil, some people keep their homes within a range of just a few degrees 24/7/365 (better for food), while others save heating/cooling money by allowing temperatures to vary 20+ degrees or more (worse for food). Some people store these items in a basement where it is cooler (on average) and there is less variance (better for food), and some people store them in the garage where it is hotter (on average) with much more variance (much worse for food). Each product also has an optimal storage temperature and this may vary from product to product, though cooler is generally better.
Guidelines such as best-by dates are fine as a general rule and they can help give us a feel for how long items are likely to last, but it's still important to be able to tell whether an item is usable or not by examining it before you use it. Fortunately, most pantry items go bad slowly and aren't terribly dangerous during the hard-to-detect earliest stages of spoilage. If you've smelled oil that's gone completely rancid, it's pretty easy to tell when it starts going bad. The smell and flavor are distinctive and naturally unpleasant, even in small quantities. In the case of oil, if you're not sure, it's probably somewhere in the probably-safe-but-maybe-not-tasty zone.
If you don't know that smell yet, try keeping a previously opened bag of nice oily potato chips around for a year or two and then open it and take a sniff. Although not particularly pleasant, is a valuable and unforgettable experience that will make it obvious for the rest of your life. I use potato chips as my example because from personal experience they have a relatively short shelf life even in ideal conditions, (so it doesn't take as long as say, a bottle of oil), they are very inexpensive, and I've never smelled that rancid oil smell stronger than with old potato chips.