fix study entry date math