How to filter by range

I have a module where I added two fields to products, starting year and ending year, we use it for compatibility of the same product, let’s say, from 2000 to 2005 include 2000, 2001, 2002, 2003, 2004 and 2005.

The question I have is how to filter them, let’s say, if I write 2003 the product should appear in the list.

Any advice or recommendation will be greatly appreciated.

Maybe you could create a Function field which compute all the years in the range and have a searcher that convert the searched value into a domain with < and > on the starting and ending year fields.

Thanks for the suggest, can I have an example similar to it?