Started implementing the date calculation