Added Date class and date functions