tell item i of indisRef
set bday to birth date
if bday > "01 01 1915" then
if death date = "" then
set theLine to {first name, middle name, surname, life span} of item i of indisRef
copy theLine to the end of indi_list
end if
end if
end tell
I was also playing around with this:
tell item i of indisRef
--set bdate to (date year of birth date)
--if bdate > "1915" then
set bdate to birth date
if bdate > "01 01 1915" then
if death date = "" then
--set ddate to date today
set age to (birth SDN - death SDN) / 365.25
if age > 80 then
set theLine to {first name, middle name, surname, life span} of item i of indisRef
copy theLine to the end of indi_list
end if
end if
end if
end tell
tell item i of indisRef
set bday to birth SDN
set dday to death SDN
try
set hasdied to contents of structure named "DEAT"
if hasdied = "Y" then set dday to "0" --filter out "has died"
on error
set hasdied to "X" --set hasdied to "?"
end try
if bday ≥ minSDN and bday ≤ maxSDN then -- has a valid birth
date that is after or on sdnminRange and is before or on sdnmaxRange
if dday = 0 then --or hasdied = "Y" then
set theLine to {first name, middle name, surname, life span} of
item i of indisRef
copy theLine to the end of indi_list
end if
end if
end tell