Try this code:

Code:
alias monthsago {
  ; $1 = months
  tokenize 32 $abs($gettok($1,1,32))

  var %cm = $asctime(m)
  var %cd = $asctime(d)
  var %cy = $asctime(yyyy)

  var %nm = $calc(%cm - ($1 % 12))

  var %dy = $calc($1 / 12)
  echo -a > $calc((%dy - $int(%dy)) * 12)
  if ($calc((%dy - $int(%dy)) * 12) > %cm) inc %dy
  echo -a dy 1: %dy
  var %ny = $calc(%cy - $int(%dy))

  var %nd = %cd
  while ((%nd > 28) && ($ctime($+(%nd,/,%nm,/,%ny)) == $null)) {
    dec %nd
    echo -a %nd
  }

  return %nd %nm %ny 
}



Syntax:
$monthsago(<months>)

Returns:
<day> <month> <year>
(numerical form)

Adjusts for days that don't exist in a specific month (ex. Feb 30). Accounts for leap years. Converts negative input to positive.

*Not fully tested. Report any bugs.

-genius_at_work