Question: The Duke of York took a new name when he became king, left the country and came back. What year did the Middle Ages end in that country?

full_context: Document 1: Huguenots: Stadtholder William III of Orange, who later became King of England, emerged as the strongest opponent of king Louis XIV after the French attacked the Dutch Republic in 1672. William formed the League of Augsburg as a coalition to oppose Louis and the French state. Consequently, many Huguenots considered the wealthy and Calvinist Dutch Republic, which led the opposition to Louis XIV, as the most attractive country for exile after the revocation of the Edict of Nantes. They also found many French-speaking Calvinist churches there.
Document 2: Ice skating: Ice skating was brought to Britain from the Netherlands, where James II was briefly exiled in the 17th century. When he returned to England, this 'new' sport was introduced to the British aristocracy, and was soon enjoyed by people from all walks of life.
Document 3: England in the Middle Ages: The 14th century in England saw the Great Famine and the Black Death, catastrophic events that killed around half of England's population, throwing the economy into chaos and undermining the old political order. Social unrest followed, resulting in the Peasants' Revolt of 1381, while the changes in the economy resulted in the emergence of a new class of gentry, and the nobility began to exercise power through a system termed bastard feudalism. Nearly 1,500 villages were deserted by their inhabitants and many men and women sought new opportunities in the towns and cities. New technologies were introduced, and England produced some of the great medieval philosophers and natural scientists. English kings in the 14th and 15th centuries laid claim to the French throne, resulting in the Hundred Years' War. At times England enjoyed huge military success, with the economy buoyed by profits from the international wool and cloth trade, but by 1450 the country was in crisis, facing military failure in France and an ongoing recession. More social unrest broke out, followed by the Wars of the Roses, fought between rival factions of the English nobility. Henry VII's victory in 1485 conventionally marks the end of the Middle Ages in England and the start of the Early Modern period.
Document 4: Late Middle Ages: Around 1300–1350 the Medieval Warm Period gave way to the Little Ice Age. The colder climate resulted in agricultural crises, the first of which is known as the Great Famine of 1315-1317. The demographic consequences of this famine, however, were not as severe as the plagues that occurred later in the century, particularly the Black Death. Estimates of the death rate caused by this epidemic range from one third to as much as sixty percent. By around 1420, the accumulated effect of recurring plagues and famines had reduced the population of Europe to perhaps no more than a third of what it was a century earlier. The effects of natural disasters were exacerbated by armed conflicts; this was particularly the case in France during the Hundred Years' War.
Document 5: Late Middle Ages: Around 1300, centuries of prosperity and growth in Europe came to a halt. A series of famines and plagues, including the Great Famine of 1315–1317 and the Black Death, reduced the population to around half of what it was before the calamities. Along with depopulation came social unrest and endemic warfare. France and England experienced serious peasant uprisings, such as the Jacquerie and the Peasants' Revolt, as well as over a century of intermittent conflict in the Hundred Years' War. To add to the many problems of the period, the unity of the Catholic Church was shattered by the Western Schism. Collectively these events are sometimes called the Crisis of the Late Middle Ages.
Document 6: New Amsterdam: On August 27, 1664, while England and the Dutch Republic were at peace, four English frigates sailed into New Amsterdam's harbor and demanded New Netherland's surrender, whereupon New Netherland was provisionally ceded by Stuyvesant. On September 6, Stuyvesant sent lawyer Johannes De Decker and five other delegates to sign the official Articles of Capitulation. This was swiftly followed by the Second Anglo - Dutch War, between England and the Dutch Republic. In June 1665, New Amsterdam was reincorporated under English law as New York City, named after the Duke of York (later King James II). He was the brother of the English King Charles II, who had been granted the lands.
Document 7: England: England has a strong sporting heritage, and during the 19th century codified many sports that are now played around the world. Sports originating in England include association football, cricket, rugby union, rugby league, tennis, boxing, badminton, squash, rounders, hockey, snooker, billiards, darts, table tennis, bowls, netball, thoroughbred horseracing, greyhound racing and fox hunting. It has helped the development of golf, sailing and Formula One.
Document 8: New York City: In 1664, Peter Stuyvesant, the Director-General of the colony of New Netherland, surrendered New Amsterdam to the English without bloodshed. The English promptly renamed the fledgling city "New York" after the Duke of York (later King James II).
Document 9: Dutch colonization of the Americas: In 1664, an English naval expedition ordered by Prince James, Duke of York and of Albany (later King James II & VII) sailed in the harbor at New Amsterdam, threatening to attack. Being greatly outnumbered, Director - General Peter Stuyvesant surrendered after negotiating favorable articles of capitulation. The Province then took a new name, New York (from James's English title). Fort Orange was renamed Fort Albany (from James's Scottish title). The region between the lower Hudson and the Delaware was deeded to proprietors and called New Jersey.
Document 10: History of New York City (prehistory–1664): The history of New York City has been influenced by the prehistoric geological formation during the last glacial period of the territory that is today New York City. The area was long inhabited by the Lenape; after initial European exploration in the 16th century, the Dutch established New Amsterdam in 1626. In 1664, the English conquered the area and renamed it New York.
Document 11: Middle Ages: The first years of the 14th century were marked by famines, culminating in the Great Famine of 1315–17. The causes of the Great Famine included the slow transition from the Medieval Warm Period to the Little Ice Age, which left the population vulnerable when bad weather caused crop failures. The years 1313–14 and 1317–21 were excessively rainy throughout Europe, resulting in widespread crop failures. The climate change—which resulted in a declining average annual temperature for Europe during the 14th century—was accompanied by an economic downturn.
Document 12: History of field hockey: A game called hockey was played in English public schools in the early 19th century. Lord Lytton wrote in 1853 that On the common some young men were playing at hockey. That old - fashioned game, now very uncommon in England, except at schools... Hockey's popularity increased with that of other team games. A version of the game played in south - east London was rougher than the modern version, played on a very large field (247m by 64m), and used a cube of black rubber and rough planed sticks. The modern game was developed on the other side of London by Middlesex cricket clubs, especially Teddington Hockey Club. The members of these clubs were looking for winter exercise, but did not particularly care for football. In 1870, members of the Teddington cricket club, who had recently moved to play in Bushy Park, were looking for a winter activity. They experimented with a 'stick' game, based loosely on the rules of association football. Teddington played the game on the smooth outfield of their cricket pitch and used a cricket ball, so allowing smooth and predictable motion. By 1874 they had begun to draw up rules for their game, including banning the raising of the stick above shoulder height and stipulating that a shot at goal must take place within the circle in front of it. An association was formed in 1875, which dissolved after seven years, but in 1886 the Hockey Association was formed by seven London clubs and representatives from Trinity College, Cambridge. Blackheath were one of the founder members, but refused to accept the rules drawn up by the other clubs and left to found the National Hockey Union. The Union failed, but the Association grew rapidly.
Document 13: Hundred Years' War: The Hundred Years' War was a series of conflicts waged from 1337 to 1453 by the House of Plantagenet, rulers of the Kingdom of England, against the House of Valois, rulers of the Kingdom of France, over the succession to the French throne. Each side drew many allies into the war. It was one of the most notable conflicts of the Middle Ages, in which five generations of kings from two rival dynasties fought for the throne of the largest kingdom in Western Europe. The war marked both the height of chivalry and its subsequent decline, and the development of strong national identities in both countries.
Document 14: Pug: Pugs were brought from China to Europe in the sixteenth century and were popularized in Western Europe by the House of Orange of the Netherlands, and the House of Stuart. In the United Kingdom, in the nineteenth century, Queen Victoria developed a passion for pugs which she passed on to other members of the Royal family.
Document 15: New Amsterdam: New Amsterdam was renamed New York on September 8, 1664, in honor of the Duke of York (later James II of England), in whose name the English had captured it. After the Second Anglo - Dutch War of 1665 -- 1667, England and the United Provinces of the Netherlands agreed to the status quo in the Treaty of Breda. The English kept the island of Manhattan, the Dutch giving up their claim to the town and the rest of the colony, while the English formally abandoned Surinam in South America, and the island of Run in the East Indies to the Dutch, confirming their control of the valuable Spice Islands. Today much of what was once New Amsterdam is New York City.
ground_truth: 1485
sub_queries: What was the regnal name of the Duke of York? Answer: James II
What location did James II come back to? Answer: England
when did the middle ages end in England Answer: 1485