added date_rule class and spec for it