Does the UCMJ apply after you leave the military?

[QUOTE=friedo]
I was under the impression that the discharge did not occur until after the sentence had ended.
[/QUOTE]

Apparently that’s not always the case. This JAG report discusses some cases involving discharged prisoners:

http://www.armfor.uscourts.gov/annual/FY00/FY00ArmyReport.pdf