Which law applies?

How property is divided can depend on what type of relationship you were in and when the relationship ended.