functionalities for date and date interval