I edit a lot of articles that contain phrases such as "A first century AD inscription..." or "First century BC writer Herodotus..." I know that a compound adjective before a noun is usually hyphenated, so if the phrase were just "A first-century inscription" I would hyphenate accordingly, but "A first-century-AD inscription", despite seeming grammatically correct, feels somehow wrong (I think because of the abbreviation) and I don't recall ever seeing this used. Meanwhile, "a first-century AD inscription" I'm fairly sure is ungrammatical.
So to sum up, which should it be?
- A first century AD inscription
- A first-century AD inscription
- A first-century-AD inscription