An extensive search lasting several seconds turned up nothing that precisely matches this, so ...

Food containers for perishable items that have RFID tags that activate only when the packaging is opened.

Example: A carton of UHT milk.

The milk sits on a storage shelf at ambient temperature for
a month.

It is then opened (automatically activating the RFID tag), a portion is used, and the package closed and placed in the refrigerator.

The smart* refrigerator "sees" the tag and notes a new container of milk.

If after (for example - user configurable) three days the refrigerator is still "seeing" the milk, it warns "MILK - 3 DAYS" on its display (and reports via WiFi to the user's phone, pc, TV, and via the Internet to Big Brother).

After five days it starts to warn about "MILK GONE BAD".

The most important point is that the system is entirety automatic. The refrigerator does not need to be shown a barcode, or taught an expiry date. Just open the pack, and put it in the fridge; the system does everything else without user intervention.

...and the RFID ideas are everywhere! I made a youtube
video of RFID pill pack where popping a pill out of a blister
pack would modify the traceries of an rfid tag so a reader
on the shelf could tell if the medication was being taken
regularly and how much. Then I searched and found out
somebody had already thought of it.

RFID tags are static things that have no power source other
than impinging EM waves. So, this Idea can only work if
there is enough ambient EM energy to allow it to start --and
keep running-- some kind of countdown-timer. It can
indicate the opened package to contain edible stuff until
the countdown reaches zero.