added new date helper function