Are these sentences correct?
- クリスマスにパソコンを買った。
- クリスマスのときパソコンを買った。
- クリスマスのときにパソコンを買った。
What is the difference when using に、とき, ときに?
Are these sentences correct?
- クリスマスにパソコンを買った。
- クリスマスのときパソコンを買った。
- クリスマスのときにパソコンを買った。
What is the difference when using に、とき, ときに?
To add on to Sabrina's answer, depending on the context に alone could be interpreted as you bought the laptop for Christmas for example. A general rule to follow is that if you're combining とき with a noun, use 〜のとき and if it's a verb just use 〜とき. However in casual speech this rule is often broken of course.
Some examples:
"In my childhood..." : 「私の子どものときに...」 "When I ride my bike..." : 「自転車に乗るときに...」
If it's already a period of time you just say に, although Christmas is a noun, one could argue it's also a period of time, and along with being left out pretty often in casual speech I understand the confusion. But for formal use, or just when in doubt, it's safest to go with what Sabrina said and use のとき.
Found a good guide: https://www.tofugu.com/japanese-grammar/toki/
There aren't any significant differences in the English sentences above. They mean the same thing. Much the same case for your sentences. とき is a shortened form of ときに, which is a more explicit and completely unambiguous version of に.
In your scenario, the temporal use of に is extremely clear. But there may be other situations where the meaning of に (since it's a particle with a lot of meanings) is a bit ambiguous, and you might want to swap it for ときに to be extra clear in communication.