Question: When was the sovereign duke of the Duchy of Saxe-Coburg and Gotha diedto whom Symphony No. 2 in C major, Op. 140 dedicated to?

Context paragraphs:
List of heirs to Saxe-Coburg and Gotha: In the redistribution of land among the Ernestine duchies that followed the death of the last Duke of Saxe-Gotha-Altenburg on 11 February 1825, the late Duke's nephew-in-law, Duke Ernst III of Saxe-Coburg-Saalfeld, received Gotha, while he ceded Saalfeld to the Duke of Saxe-Meiningen.  On 12 November 1826 he thus became Ernst I of Saxe-Coburg and Gotha.  The duchies of Saxe-Coburg and Saxe-Gotha remained in personal union until 1852, when a political union was effected.

Ernest II, Duke of Saxe-Coburg and Gotha: Ernest II (German: "Ernst August Karl Johann Leopold Alexander Eduard"; 21 June 1818 – 22 August 1893) was the sovereign duke of the Duchy of Saxe-Coburg and Gotha, reigning from 1844 to his death.  Ernest was born in Coburg as the eldest child of Ernest I, Duke of Saxe-Coburg-Saalfeld, and his duchess, Princess Louise of Saxe-Gotha-Altenburg.  Fourteen months later, his younger brother Prince Albert was born, who became consort of Queen Victoria of the United Kingdom.  Ernest's father became Duke of Saxe-Coburg and Gotha in 1826 through an exchange of territories.

Friedrich Josias, Prince of Saxe-Coburg and Gotha: Friedrich Josias, Prince of Saxe-Coburg and Gotha (Friedrich Josias Carl Eduard Ernst Kyrill Harald; Callenberg Castle, 29 November 1918 – Amstetten, Austria, 23 January 1998) was the head of the Ducal Family of Saxe-Coburg and Gotha and titular Duke of Saxe-Coburg and Gotha from 1954 until his death.

Symphony No. 2 (Raff): Symphony No. 2 in C major, Op. 140, was composed by Joachim Raff in Weimar in 1866.  It is one of the three Raff symphonies that does not carry a descriptive title.  It is dedicated to Ernest II, Duke of Saxe-Coburg and Gotha.  It was premiered in Weimar in 1867 and was published two years later in Mainz.  A few years later the symphony received its second performance in the Leipzig Gewandhaus under Raff's baton.  A typical performance lasts for about 37 minutes.

Ernest I, Duke of Saxe-Coburg and Gotha: Ernest I (German: "Ernst Anton Karl Ludwig Herzog" ; 2 January 1784 – 29 January 1844) was the last sovereign duke of Saxe-Coburg-Saalfeld (as Ernest III) and, from 1826, the first sovereign duke of Saxe-Coburg and Gotha (as Ernest I).  He was the father of Albert, Prince Consort of Queen Victoria and is thus a patrilineal ancestor and great-great-great-grandfather of Queen Elizabeth II.  Ernest fought against Napoleon Bonaparte and through construction projects and the establishment of a court theatre left a strong imprint on his residence town, Coburg.

Alfred, Duke of Saxe-Coburg and Gotha: Alfred (Alfred Ernest Albert; 6 August 184430 July 1900) reigned as Duke of Saxe-Coburg and Gotha from 1893 to 1900.  He was the second son and fourth child of Queen Victoria of the United Kingdom and Prince Albert of Saxe-Coburg and Gotha.  He was known as the Duke of Edinburgh from 1866 until he succeeded his paternal uncle Ernest II as the reigning Duke of Saxe-Coburg and Gotha in the German Empire.

Princess Amalie of Saxe-Coburg and Gotha: Princess Marie Luise Franziska "Amalie" of Saxe-Coburg and Gotha, full German name: "Marie Luise Franziska Amalie, Prinzessin von Sachsen-Coburg und Gotha, Herzogin zu Sachsen" (23 October 1848, Coburg, Saxe-Coburg and Gotha – 6 May 1894, Schloss Biederstein, Schwabing, Munich, Kingdom of Bavaria) was a Princess of Saxe-Coburg and Gotha by birth and a Duchess in Bavaria through her marriage to Duke Maximilian Emanuel in Bavaria.  Amalie was the fourth child and second eldest daughter of Prince August of Saxe-Coburg and Gotha and his wife Princess Clémentine of Orléans.  Her youngest brother was Ferdinand I of Bulgaria.

Symphony No. 9 (Schubert): The Symphony No. 9 in C major, D. 944, known as the Great (published in 1840 as “Symphony No. 7 in C Major”, listed as No. 8 in the Neue Schubert-Ausgabe), is the final symphony completed by Franz Schubert.  Originally called "The Great C major" to distinguish it from his Symphony No. 6, the "Little C major", the subtitle is now usually taken as a reference to the symphony's majesty.  Unusually long for a symphony of its time, a typical performance of "The Great" takes around 55 minutes, though it can also be played in as little as 45 minutes by employing a faster tempo and not repeating sections as indicated in the score.

Princess Dorothea of Saxe-Coburg and Gotha: Princess Dorothea Maria Henriette Auguste Louise of Saxe-Coburg and Gotha (30 April 1881 – 21 January 1967) was a princess of Saxe-Coburg and Gotha (German: "Prinzessin von Sachsen-Coburg und Gotha" ) by birth and the duchess of Schleswig-Holstein (German: "Herzogin zu Sachsen" ) through her marriage to Ernst Gunther, duke of Schleswig-Holstein.  Dorothea was born in Vienna, Austria, the second child and only daughter of Prince Philipp of Saxe-Coburg and Gotha and Princess Louise of Belgium.

Andreas, Prince of Saxe-Coburg and Gotha: Andreas, Prince of Saxe-Coburg and Gotha, Duke of Saxony (given names: "Andreas Michael Friedrich Hans Armin Siegfried Hubertus"; born 21 March 1943) has been the head of the House of Saxe-Coburg and Gotha since 1998.  He is the grandson of Charles Edward, Duke of Saxe-Coburg and Gotha, the last ruling duke.

Supporting paragraphs: Symphony No. 2 (Raff) Ernest II, Duke of Saxe-Coburg and Gotha
Answer: 22 August 1893