Accepts both types of dates