smaal refactoring and improvement of date handling in test