Please read the following table in Markdown format and then answer the question according to the table. Table cells in one row are seperated by '|', and different rows are seperated by '
'.

Table:
| Name | Heir of | Birth | Ceased to be Duke of Girona | Death |
| --- | --- | --- | --- | --- |
| Infante Juan later John I | Peter IV | 27 December 1350 | 6 January 1387 became King | 19 May 1396 |
| Infante James | John I | 1382 | 1388 | 1388 |
| Infante Ferdinand | John I | 1389 | October 1389 | October 1389 |
| Infante Peter | John I | 1394 | 1394 | 1394 |
| Infante Alfonso later Alfonso V | Ferdinand I | 1396 | 19 February 1416 Raised to Principality | 27 June 1458 |
| Prince Charles | John II | 29 May 1421 | 23 September 1461 | 23 September 1461 |
| Prince Ferdinand later Ferdinand II | John II | 10 March 1452 | 20 January 1479 became King | 23 January 1516 |
| Prince John, Duke of Lorraine (claimant) | René | 2 August 1424 | 16 December 1470 | 16 December 1470 |
| Prince Nicholas, Duke of Lorraine (claimant) | René | 7 July 1448 | 27 July 1473 | 27 July 1473 |
| Prince Juan | Ferdinand II | 28 June 1478 | 4 October 1497 | 4 October 1497 |
| Prince Miguel | Ferdinand II | 24 August 1498 | 19 July 1500 death | 19 July 1500 death |
| Infanta Joanna later Joanna I | Ferdinand II | 6 November 1479 | 3 May 1509 brother 's birth | 12 April 1555 |
| Prince John | Ferdinand II | 3 May 1509 | 3 May 1509 | 3 May 1509 |
| Infanta Joanna later Joanna I | Ferdinand II | 6 November 1479 | 23 January 1516 became Queen-regnant | 12 April 1555 |
| Prince Charles later Charles I | Joanna I | 24 February 1500 | 14 March 1516 became King | 21 September 1558 |
| Prince Philip later Philip II | Charles I | 21 May 1527 | 16 January 1556 became King | 13 September 1598 |
| Prince Carlos | Philip II | 8 July 1545 | 24 July 1568 | 24 July 1568 |
| Prince Ferdinand | Philip II | 4 December 1571 | 18 October 1578 | 18 October 1578 |
| Prince Diego | Philip II | 15 August 1575 | 21 November 1582 | 21 November 1582 |
| Prince Philip later Philip III | Philip II | 14 April 1578 | 14 April 1598 became King | 31 March 1621 |
| Prince Philip later Philip IV | Philip III | 8 April 1605 | 31 March 1621 became King | 17 September 1665 |
| Prince Baltasar Carlos | Philip IV | 17 October 1629 | 9 October 1646 | 9 October 1646 |
| Prince Philip Prospero | Philip IV | 20 November 1657 | 1 November 1661 | 1 November 1661 |
| Prince Charles later Charles II | Philip IV | 6 November 1661 | 17 September 1665 became King | 1 November 1700 |
| Prince Joseph Ferdinand | Charles II | 28 October 1692 | 6 February 1699 | 6 February 1699 |
| Prince Felipe | Juan Carlos I | 30 January 1968 | Incumbent | Incumbent |
Question:
WHAT IS THE Ceased to be Duke of Girona THAT HAS PETER IV?
Answer:
6 January 1387 became King