In 1870, the first Sword Abolishment Edict (廃刀令, Haitōrei) banned farmers and merchants from impersonating samurai and wearing swords in public. In 1876, the second Sword Abolishment Edict followed, banning even former samurai from wearing swords in public. As a result, carrying swords in public became reserved for either current military or police personnel or a small select group of people that retained samurai status (mostly ex-daimyo).
Nowadays, carrying swords in public is regulated by the Japanese Firearm and Sword Possession Control Law (銃刀法剣類所持等取締法). Regulated here means forbidden, as any blade longer than a specified length (15 cm for single-edged, and 5.5 cm for double-edged) is prohibited from being possessed or carried in geneeral. As far as I understand the main parts, nowadays you can only obtain a license to possess a blade longer than 15 cm, but not one to carry a sword (or firearm) in public. You can also transport your sword to perform the reason you have obtained the license for, e.g. to training, or for other justifiable reasons, e.g. to maintenance, but you can not carry it (openly) in public.
However, that modern law was first enacted in 1958, and while it is a spiritual successor of the Haitōrei and even earlier Sword-hunts and gun control legislation, I fail to find a note of repeal at the start of the modern text, which would note that the Sword Abolishment Edict would be replaced by the modern law. Am I missing a law in the legislation line, or is the Haitō edict still good law and valid?