In Scotland a child born six months after marriage is legitimate, which is allowing an ample margin.

A child may be born alive, but may not be viable, by which is meant that it is not endowed with a capacity of maintaining its life. Speaking generally, 180 days represents the lowest limit at which a child is viable, but prolonged survival under these circumstances is the exception. Many cases, however, have been recorded in which children born at six months have been reared. The signs of immaturity and maturity may be thus tabulated:

Aids to Forensic Medicine and Toxicology — Part 38

Centre of body high; head Strong movements and cries as soon disproportionate in size; membrana as born; body clear, red colour, pupillaris present; testicles coated with sebaceous matter; mouth, undescended; deep red colour of nostrils, eyelids, and ears, open; parts of generation; intense red skull somewhat firm, and fontanelles colour, mottled appearance, and not far apart; hair, eyebrows, and downy covering, of skin; nails not nails, perfectly developed; formed; feeble movements; testicles descended; free discharge inability to suck; necessity for of urine and meconium; power of artificial heat; almost unbroken suction, indicated by seizure on the sleep; rare and imperfect nipple or a finger placed in the discharges of urine and meconium; mouth. closed state of mouth, eyelids, and nostrils.

Aids to Forensic Medicine and Toxicology — Part 38

A child born in wedlock is presumed to have the mother's husband for its father. This may, however, be open to question upon the following grounds: Absence or death of the reputed father; impotence or disease in the husband preventing matrimonial intercourse; premature delivery in a newly-married woman; want of access; and the marriage of the woman again immediately on the death of her husband. In the last case, where either husband might have been the father, the child at the age of twenty-one is at liberty to select its father from the possible pair.

Aids to Forensic Medicine and Toxicology — Part 38

A child born of parents before marriage is in Scotland rendered legitimate by their subsequent marriage, but in England the offspring remains illegitimate whether the parents marry or not after its birth. The offspring of voidable or invalid marriages may be made legitimate by application to the courts.