Implementing getDate() and setDate()