use AppleScript version "2.4"
use framework "Foundation"
use scripting additions
set theDate to ((current date) - 1 * days)
set dateFormat to current application's NSDateFormatter's alloc()'s init()
dateFormat's setDateStyle:(current application's NSDateFormatterLongStyle)
dateFormat's setTimeStyle:(current application's NSDateFormatterMediumStyle)
dateFormat's setDoesRelativeDateFormatting:true
set theDay to (dateFormat's stringFromDate:theDate) as text
In fact, I found it here, but it didn’t show up when I searched SD Forums…