Code for DateAndTime.java