I would say that mēnsēs is the object of "in" rather than "dīviditur", but yes, that's the idea. The general rule with the preposition "in" is that it takes the accusative when it means "into" and the ablative in any other situation. Obviously, you can't always translate literally in that fashion, but it happens that this is one instance where you can.
One of the most famous sentences in the Latin language uses this construction as well: "Gallia est omnis dīvīsa in partēs trēs", the first words of Caesar's De Bello Gallico. "Partēs trēs" is obviously accusative (it can't be nominative since prepositions don't take the nominative, and the ablative would have been "partibus tribus").