better handling of date parameters