Question: What years was Michelangelo working on David?
About the article "David (Michelangelo)", section "Commission".

Candidate passages:
The Last Judgment, or The Last Judgement (), is a fresco by the Italian Renaissance master Michelangelo executed on the altar wall of the Sistine Chapel in Vatican City.
It is a depiction of the Second Coming of Christ and the final and eternal judgment by God of all humanity.
The souls of humans rise and descend to their fates, as judged by Christ surrounded by prominent saints including Saints Catherine of Alexandria, Peter, Lawrence, Bartholomew, Paul, Sebastian, John the Baptist, and others.
The work took four years to complete and was done between 1536 and 1541 (preparation of the altar wall began in 1535.)
Michelangelo began working on it twenty five years after having finished the Sistine Chapel ceiling. 
In 1527, the Florentine citizens, encouraged by the sack of Rome, threw out the Medici and restored the republic.
A siege of the city ensued, and Michelangelo went to the aid of his beloved Florence by working on the city's fortifications from 1528-29.
The city fell in 1530, and the Medici were restored to power.
Completely out of sympathy with the repressive reign of the ducal Medici, Michelangelo left Florence for good in the mid-1530s, leaving assistants to complete the Medici chapel.
Michelangelo left Florence for the last time at the age of sixty, leaving the Medici chapel unfinished.
Michelangelo decided to settle in Rome, where he had hoped to finish Pope Julius II's tomb but was unable to do so, due to a new project that had been assigned to him by Pope Julius II.
Thus Michelangelo set the tomb aside to paint a fresco in the Sistine Chapel.
Michelangelo was commissioned to do the tombs of Urbino, Lorenzo de' Medici’s grandson, Giuliano, duke of Nemours and Lorenzo’s third son, and popes Leo X and Clement VII, both Medici; also Lorenzo the Great.
Only two were completed: Giuliano’s and Lorenzo’s.
Although the construction of the monument of Pope Julius did not go according to plan, it was officially unveiled in February 1545.
The original design had been cut down to something small and manageable with only three sculptured done by Michelangelo.
Michelangelo, at seventy years old, had set a high standard for the following artists to come.
People were already attempting to sum up his accomplishments and considering his place in history.
From this time on, he was known as the ‘Divine Michelangelo’, a living legend, the master of Renaissance.
Yet old though he was, in 1547, Pope Paul III appointed him chief architect of St. Peter's Basilica, which he would work on for the rest of his life.
Michelangelo died of old age, leaving the project unfinished.
Though he devoted the last seventeen years of his life to this task, Michelangelo refused to accept anything.
He said he did it for the good of his soul.
Years later his body was brought back from Rome for interment at the Basilica di Santa Croce, fulfilling the maestro's last request to be buried in his beloved Tuscany. 
Some have hypothesized that Michelangelo depicted himself in the flayed skin of St. Bartholomew (see below) based on feelings of contempt Michelangelo may have had for being commissioned to paint "The Last Judgment."
Michelangelo often drew himself in a way where he had lost all his power and might.
He questioned over thoughts of dying and the Day of Judgement, which is seen as a reference to this work.
Michelangelo was in his late sixties when he finished this painting, and it has been argued that the peeling of Bartholomew signifies the peeling of the flesh awaiting a new rebirth.
The bearded figure of St. Bartholomew holding the skin was theorized to depict the satirist and erotic writer Pietro Aretino, who had tried to extort a valuable drawing from Michelangelo; this theory has been conclusively refuted because the conflict between Michelangelo and zed Aretino did not occur until 1545, seven years after the fresco's completion. 
The tomb was originally commissioned in 1505, yet was not completed until 1545 on a much reduced scale:  1505 – Commissioned by Julius; Michelangelo spends 9 months choosing marble at Carrara  1506 – Michelangelo returns to Rome due to a lack of funds available for the project.
Bramante and Raphael, apparently jealous of Michelangelo's commission, convince the Pope that it would be bad luck to have his tomb built during his own lifetime, and is dismissed by Julius.
Michelangelo, angry and bitter, returns to Florence.
Julius, now with his army in a siege against Bologna threatens to wage war on the state unless Michelangelo presents himself and apologies, which he does.
Julius give Michelangelo the unwelcome task of creative a huge bronze sculpture of the Pope.
This takes two years of incredibly hard work.
He then returns to Rome, hoping the Pope will renew his interest in the Tomb project.
1508 – Bramante and Raphael convince the Pope that Michelangelo's time would be better spent on the Sistine Chapel ceiling in the Vatican Palace (assuming that Michelangelo, primarily a sculptor, would have great difficulty in completing a painting of such scale).
1512 – Michelangelo completes the Sistine Chapel ceiling project and returns to the tomb.
1513 – Michelangelo begins three sculptures for the project: the 'Dying Slave' and the 'Rebellious Slave' (now in the Louvre, Paris) and 'Moses', which is now a part of the final design.
When Julius dies the new Pope Leo X abandons the project.
1516 – A new contract is agreed between Michelangelo and Julius' heirs who demand the completion of the project.
1520s – Carves "The Genius of Victory" and 4 unfinished slaves, which now sit in the Galleria dell'Accademia in Florence with the David  1532 – A second new contract is signed by Michelangelo which involves a wall-tomb.
1542 – The wall-tomb is begun by Michelangelo after final details are negotiated with Julius' grandson.
1545 – The final tomb is completed, and installed in San Pietro in Vincoli in Rome; it includes the original 'Moses' sculpture along with 'Leah' and 'Rachel' on the lower level, and several other sculptures (definitively not by Michelangelo) on the upper level.
One of Pope Julius II’s largest and most well known commissions was the reconstruction of St. Peter’s Basilica, beginning in 1506.
When Julius took the papal office, the condition of the Church was extremely poor, and he took the opportunity to expand it, modernize it, and leave his impression forever on the Vatican.
Julius hired Donato Bramante to design the Basilica, a prominent architect and artist of the day.
This was seen as a surprise move at the time, many thought Giuliano da Sangallo was the front runner for the commission.
Della Rovere wanted the splendor of the new Cathedral to inspire awe in the masses, produce support for Catholicism and prove to his enemies he was a pious and devoted man.
Bramante not only would fulfill these expectations with his design, but also with his character, which may explain why della Rovere chose him over Sangallo.
“Bramante wanted to build a Basilica that would ‘surpass in beauty, invention, art and design, as well as in grandeur, richness and adornment all the buildings that had been erected in that city’" (Scotti, 47).
Raphael came to work for the Pope because of his friendship with Bramante.
Bramante had been in Rome working for the Pope when he sent a letter to Raphael telling him that he had convinced Julius to allow Raphael to paint the Stanza della Segnatura.
Raphael who had been working on other commissions in Florence immediately dropped his projects and moved to Rome to work for the Pope, but when he arrived he found many great artists painting in the Stanza della Segnatura.
When he finished the Vatican Library, he amazed Julius II so much that according to Vasari he chose "to destroy all the scenes painted by other masters from the past and present, so that Raphael alone would be honored above all those who labored on the paints which had been done up to that time"(Vasari, 314). 
 Michelangelo – "David"