Cleaning up birth years 2000 in my Address Book
Solution 1:
Try:
set targetYear to "2000"
set targetGroup to {}
tell application "Address Book"
set thePeople to every person whose birth date ≠ missing value
repeat with aPerson in thePeople
set birthYear to (aPerson's birth date)
if my yearCheck(birthYear, targetYear) then set end of targetGroup to (contents of aPerson)
end repeat
if targetGroup ≠ {} then set selection to targetGroup
activate
end tell
on yearCheck(theDate, theYear)
if theYear = (year of theDate as text) then return true
return false
end yearCheck
Added by the OP for novices like him. This works. What I did: Open Address Book, click All Contacts, close Address Book, close the Internet connection (just to be sure), copy-paste the above script into AppleScript Editor, press Compile, press Run, wait until "Running..." disappears. Address Book is now open with the cards with 2000 selected. Put those in a Group for further work...
Solution 2:
I accidentally posted an answer here on this question meant for:
Removing only birth years from a group in my Address Book
Since it is related I will leave a link to the other question.