better date and period checking
tests