united-states
A court in a divorce case does not determine the gender of the parties, and doesn't have to do so. No legal doctrines in divorce cases in the U.S. are gender dependent.
The main factors in alimony determinations are the length of the marriage, the relative incomes of the spouses, and the extent to which one party has made an economic sacrifice in the marriage that impacted that party's income. On average, this gender neutral test means that women are more likely to receive alimony awards than men, but this isn't always the case.
Child support, likewise, is based upon the relative gross incomes of the parties and the number of nights that the child spends with each parent, with adjustments for extraordinary expenses, amounts paid "in kind" by each parent, and imputation of income when a parent is intentionally unemployed or underemployed in order to reduce a child support obligation. Again, it is more common for a wife to receive child support under this gender neutral test, but both outcomes happen.
Property divisions seek either an equal or "equitable" distribution of property acquired in the marriage, although the exact details vary from state to state. But no of the U.S. property distribution doctrines are facially gender dependent. Often a pension or business asset will be allocated to the parent whose work it is associated with, while non-income producing "use assets" are allocated to the other spouse to balance the scales, but this is not a universal rule and varies on a case by case basis and with the tendencies and biases of the individual judge involved.
Attorney fees and costs in divorce actions are usually allocated based upon ability to pay.
UPDATE: since all the answers so far don't actually answer my question
and instead try to frame-challenge it as "gender is not relevant, so I
won't answer the detail you asked - which is how the court decided on
gender of a party"; I must point out that at the VERY least, gender
strongly influences custody choice (absent truly exceptional
circumstances, females get primary - if not sole - custody BY DEFAULT,
in majority of cases, without any need for proof or evidence, and
getting even equally shared custody for a male is an enormous
challenge, never mind primary). So, please answer the question asked,
NOT challenge the frame.
Your perception that gender is legally relevant to custody choices isn't correct and hasn't been legally correct for 30-50 years when the "tender years doctrine" was abolished in favor of a gender neutral "best interests of the child" standard (the date varied from state to state).
Ohio, which was typical, abolished the tender years doctrine in 1974. Some of the laggards in abolishing the doctrine were Alabama which did so in 1981, and South Carolina which did so in 1994. As of November 12, 2004, "all states ha[d] replaced the tender years doctrine with a gender-neutral best interests of the child doctrine[.]" (Source, in the closed access body text.)
Shortly after the transition from the tender years doctrine to the best interests of the child test, older judges who had applied the older test did sometimes covertly apply the older tender years doctrine test. But, for the most part, that generation of judges has now left the judiciary due to retirement or death (judging is usually a second career begun later in life), and gender neutrality is firmly embedded in the mindset of most judges. This said, in the many states where trial judges are elected, the biases of voters impact the attitudes of judges who are elected, and that can put judges in tension with the prevailing law. But most judges faithfully try to carry out the controlling law of their jurisdictions.
In Washington State, the tender years doctrine was abolished long before its second major legislative innovation was adopted in 2007:
The state of Washington adopted a shared parenting legislative model
in 2007. This means that judges hearing custody cases must attempt to
award joint custody whenever possible, as long as such a decision is
determined to be in the best interests of the child(ren) involved. In
2017, there are still many states that do not follow this model. In
this post, we will examine what this means for Washington parents.
Shared Custody vs. Visitation
Before the enactment of a presumptive shared (or joint) custody
standard, Washington courts preferred to award sole physical custody
to one parent. They usually granted visitation, but this antiquated
model essentially amounted to a “winner” and “loser” in contested
custody cases. Thankfully, Washington state was one of the first in
the nation to collect data on the children of divorced parents and
amend long-held laws governing custody and support.
Shared custody doesn't imply a equal number of nights with each parent. It means that one parent isn't awarded custody and another awarded visitation, with instead, each parent awarded some non-binary amount of parenting time. Major life decision-making is often shared as well, unlike a custody-visitation framework, although in cases where parents just can't agree on any major life decisions for a child, a court may award sole custody.
Your emphatic belief that the law is something other than it is doesn't make it true.
Custody would be determined in a divorce case where gender is unclear, in the same way as any other case, based upon "the best interests of the child" on a case by case basis under the individualized facts of the particular case with the particular parties involved. These determinations are reviewed by appellate courts only for an abuse of discretion (and, in divorce cases like all other forms of civil cases, custody decisions are made in settlements reached by the parties rather than by a judge 90%+ of the time).
[The] “best interest” standard. . . [is] derived from the UN
Convention on the Rights of the Child, claims that “all actions
concerning children, whether undertaken by public or private social
welfare institutions, courts of law, administrative authorities, or
legislative bodies” should be primarily determined by what's in the
best interest of the child.
(Source)
Now, instead of applying the tender years doctrine, in custody cases, one thing that courts often do try to do to implement the "best interests of the child" is to try to reproduce the pre-divorce parenting time of the parties, without regard to gender, as much as possible. On average, women in married couples spend more time parenting than men, but this is not universally the case.
If a couple lives a very gender segregated 1950s style family life (as a significant minority of couples, perhaps 30%, do), the divorce outcomes tend to produce results similar to the older rules. But if a couple does not have that kind of lifestyle, their divorce outcomes will normally reflect their lifestyle.
For example, in a couple with a husband who works full time, and a wife who is a stay at home mom, the wife is likely to get more parenting time than the husband.
But the reverse is true in the less common case (which still exists, I have clients in these relationships, and so is the husband of my state's governor), where the one spouse works full time and a husband is a stay at home dad.
Results tend to be fairly equal, in contrast, in cases where both parents work demanding full time jobs (e.g., in the case of the divorce of one of my colleagues, a partner in a busy, high end, law practice, who was divorced from the CEO of a major international consumer product importing firm where each spouse had one week on and one week off every two weeks of parenting time at a shared house where the child lived 100% of the time since they could afford it, which each parent having a small apartment during "off times" at first).
couples with 50/50 income and asset ownership and similar
self-reported childcare habits, the custody would come out literally
50/50.
As someone who has practiced law for 25 years with a steady low level volume of divorces (perhaps 1-3 per year), this is indeed what usually does happen in cases like this (which are not terribly common). Judges actually consider these cases some of the easy ones.
The hardest cases (which judges really agonize over and push parties to settle particularly hard so that they don't have to decide them) are cases when the parties live very far apart from each other (e.g. California and Maine) and can't afford to frequently fly a child back and forth, where the realities of the desirability of a child attending only one school each year favors a school year with one parent, long vacations with the other parent parenting time schedule. In those cases, where 50-50 parenting is otherwise indicated, the fit of the school and community available with each parent to the child often breaks the tie (and with older children, the preferences of the children are considered).
Resort to gender stereotypes is even more rare in divorces involving LGBT couples than among straight, cis-gender couples.