Learning the basics of new frameworks/libraries can be done in two weeks. Learning an entirely new field of study or research can be justified in terms of many months.
I disagree - unless you are talking about becoming an expert. But I prefer to become an expert in the course of using things in the real world.
This applies to the theoretical knowledge as well - you can easily learn new data structures or algorithms in two weeks. Then you can master them when you have a problem that requires you to use them.