Template:Decades and years/addepoch

This template returns   if  is either not specified or set to AD. Otherwise it returns   or, iff  is specified,  .