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
}