Some employers will happily employ a bright candidate and teach them the language on the job.
Other employers will ensure that your knowledge of a given language is top-notch and expect you to know everything and work fully autonomously.
So it all depends on the employers and the individual jobs.
Also, it depends on your definition of "learning" a language. Being able to write a hello world sort of program on your own takes a few minutes to a few hours maximum. Writing a moderately complex program would probably take weeks at least. But just because you wrote a program, it doesn't mean that your knowledge is perfect. A problem could be solved in many ways where one way is arguably better than the other.
So it all depends. :)
You can find all kinds of online tests, such as Hackerrank. If you can solve such tests confidently, then you probably have decent enough knowledge for an average job. But again, every job has different needs. To get to this level it would probably take weeks/months of practice (preparing 8 hours a day).
Seeing your comment on https://question.onlinegdb.com/4894/how-to-write-a-program-that-displays-a-weekly-payroll-report I'd say you should pay a bit more attention to details. Your code is not properly shared there for instance.
Go test yourself, practice and you'll improve! :)