minor adjustment to calendar parsing code