Pope Gregory XIII ( 7 January , 1502 â `` 10 April , 1585 ) , born Ugo Boncompagni , was Pope from 1572 to 1585 . Pope Gregory XIII ( 7 January 1502 -- 10 April 1585 ) , born Ugo Boncompagni , was Pope from 1572 to 1585 .