What's the difference between まで and までに?


I'm studying for N3 Japanese test. I'm stuck in a sentence of an exercise in
which is written

> 帰国{きこく}するまでになんとか日本語{にほんご}を習得{しゅうとく}したい。

Why is it wrong to say

> 帰国するまでなんとか日本語を習得したい。?

I really don't get it, if someone could teach me the difference I would be
really happy. Thanks!




In short,

  * まで = _until_
  * までに = _by_

Or to say, `A まで B` means _B_ keeps taking place while _A_ doesn't come, and
`A までに B` means _B_ gets to come true before (the end of) _A_ comes. Thus,

> 帰国するまでなんとか日本語を習得したい。

would (even we overlook some stiffness) imply you're willing to forget
Japanese after you return, which is not a very laudable attitude for a
Japanese student :D

