間に means "while" or "during", and the main clause is a single event that happens somewhere inside that stretch of time. A verb in front of it is a continuing action in the ~ている form or a state such as ; a noun takes , a な-adjective .
、。
While my mother was out shopping, I cleaned the room.
、。
It snowed while I was asleep.
、。
I went to Japan during the summer holidays.
、。
It looks like someone came while I was out.
A negative before 間に describes a state that lasts. The common ones are , "before I knew it", and , "while someone was away".
、。
Before I knew it, the cherry blossoms were out.
、。
While the teacher was out, the students started playing.
間に or 間
without に means the main action fills the whole period, so its main verb is a continuing one, often with
. 間に picks out one event inside the period.
、。
I finished my homework while the child was asleep.
、。
I watched TV the whole time the child was asleep.
- × 子供が寝ている間、宿題を終えた → 子供が寝ている間に、宿題を終えた
間に or うちに
adds "before it changes": do it while you still can. 間に only marks a span of time. After a negative such as 暗くならない, only うちに works; after an adjective both are possible, and うちに is the usual one.
、。
You should try lots of things while you're young.
。
Let's go home before it gets dark.
- × 暗くならない間に帰ろう → 暗くならないうちに帰ろう