Depends on your exeperience, on the language and what do you mean by learning. For a first language, 1 year to use it easily. Two years to be good with it. And three to master it.
I've been coding for ages, and depends on what you mean on Learn. If you want to get to a level as in coding a full 3d game from c++, years. Otherwise, like algorithms and such, you could in a week. I currently know 34, you speed up a lot if you know one.
Most likely depends on your previous experience and whether you are an easy learner. That said, it took me about 6 months to properly understand the basics of python and now many years later i'm still learning. So i guess it's the practice that makes (almost) perfect