Warning: MAJOR SPOILERS for Doctor Strange are ahead!
For the most part, the Marvel Cinematic Universe has done a satisfiable job of making sure moviegoers understand the franchise's timeline. Specific years aren't always mentioned, but for the most part, every movie takes sequentially one after the other, with the exception flashbacks, Captain America: The First Avenger and The Incredible Hulk taking place before Iron Man 2. Doctor Strange, though, is a little harder to nail down. Because the movie was so self-contained and dropped few references to other corners of the MCU, it was difficult to tell when Stephen Strange's mystical journey occurred. Fortunately, thanks to information from one of the writers and logical reasoning, we've narrowed down a reasonable timeframe.
Let's start with what we know for a fact. Over the weekend, several fans asked Doctor Strange co-writer C. Robert Cargill on Twitter if the movie is set before Captain America: The Winter Soldier. Remember, Jasper Sitwell named Stephen Strange as one of Project Insight's potential targets, and a benevolent sorcerer would definitely classify as an enemy of HYDRA. However, Cargill debunked that idea, saying that Doctor Strange begins in 2016. A brief shot of Avengers Tower in New York City confirms that, meaning that the events of Avengers: Age of Ultron have already occurred. So when we met the egotistical Stephen Strange as a surgeon, it's early into 2016, though it's harder to determine the month. I'm guessing sometime in February, but that is in no way official.
Okay, so at the beginning of 2016, Stephen Strange was still a surgical superstar and living the life of extravagance. Then the fateful car crash occurred, and after he was found in the "golden hours," he spent 12 hours on the operating table. Then he spent approximately two months in physical therapy, but neither that nor the experimental procedures were successful with fully healing his hands. By the time he told Christine Palmer to leave his apartment, let's assume it was early May at the latest.
Then we came to the meat of Doctor Strange's story: his training in the mystic arts under The Ancient One, Mordo and Wong. Unfortunately, it's significantly harder to pinpoint how long Stephen Strange was at Kamar-Taj. The only notable time reference was when Stephen told Christine how he had sent her multiple emails, but never heard back from her. That's not much to go on, but it does imply that he was across the globe for many months, which would also mean that his time learning about magic happened post-Captain America: Civil War.
Plus, even with his eidetic memory cutting down the standard mystic arts learning time, one would imagine it still took him a while to become a talented sorcerer. You don't go from barely creating a portal to skillfully manipulating time against Kaecilius and Dormammu in a matter of weeks. Just for fun, let's say that by the time the movie's climactic battle scene occurred, it was early November. That places that event around the same time the movie itself was released, and provides a nine month-period for the main story. That makes sense, right? If not, feel free to play a little safer and place the climax in January or February, meaning Doctor Strange lasted approximately one year.
Finally, we come to Doctor Strange's mid-credits scene, where the eponymous hero chatted with Thor about finding Odin. At this point, Strange was the new master of the New York Sanctum Sanctorum and had mastered the powerful "infinite beer refills" spell. It's still unclear whether Stephen Strange will actually show up in Thor: Ragnarok, but since the God of Thunder asked for Strange's help with finding Loki, one would logically presume that they'll begin their search immediately rather than wait around. So if Thor: Ragnarok takes place in November 2017 (which is when the movie will be released), that means this scene takes place days or at most weeks before that story kicks off, placing the meeting in October at the very earliest.
Again, aside from C. Robert Cargill's comments, all of the above is speculation. We're just doing our best to build a reasonable timeline going off the information provided. If you have your own guess for when Doctor Strange took place, make sure to let us know in the comments below.