Added some tests and used a default value for closest date/value matches.