more convincing date calculations based on Martin's date module
Added throw and try..catch..finally (see #40)