Fixed implicit conversions for RichDate and RichTimestamp and added
a test which would have detected the problem.