Updated for new date library