How to add custom Views filters (for example, date between X & Y, but specified by myself) As per title. I am aware that there is a specific filter for date between X and Y, but if I wanted to programmatically develop it, what ways are there to do this?

EDIT : To be more specific, I am using Views 3 so that I can use apache solr views on Drupal 6.
Date ranges in solr views still being worked on - see http://drupal.org/node/642430 for latest patch from July 11 2011