This type of terminology almost makes it sound like you are working requirement statements or business rules for a software product. In such cases, simple, exact statements are more useful than the way the language "sounds" to the ear.
I would replace before/after in such s situation with later than/earlier than:
- D must be later than 12 months ago. D must be earlier than 6 months ago.
Alternatives to earlier than in the above example are prior to and no later than.
In common conversational English, and even in more formal prose, you would expect to hear "D must be between 12 and six months ago" or even "D must be later than a year ago but earlier than six months ago." However, I take it from your question that this is not the goal you are looking for.
By the way, if you are in fact writing these as software requirement statements, ensure you are distinguishing between "after" and "on or after" (i.e. inclusive versus exclusive date ranges).