From the time a farmer harvests strawberries or green beans, they will last — at best — three weeks before they start to rot. It takes a week or two to reach the grocery store and then your fridge, giving you only a few days to eat them.

A Santa Barbara-based startup called Apeel Sciences says it has invented edible coatings that can extend a fruit or vegetable's shelf life by as much as five times. That means, if you spray it on a ripe strawberry that's starting to wither it will last about a week longer than normal.

Made of leftover plant skins and stems, the coatings act as barriers that slow down the decay process. You can apply it to produce anytime during its lifespan — Apeel could even make a bunch of bananas grown at the same time each ripen on a different day.

Six farms in Southern California, Kenya, and Nigeria are using Apeel's products, CEO James Rogers tells Business Insider.

The US Food and Drug Administration has approved Apeel's first products, Edipeel and Invisipeel, as "generally recognized as safe," meaning they're OK to eat and sell.

Here's how they work.