Formatting Dates

Yes, that’s the correct name. But inprogramming it’s generally called a backtick or backquote. See https://en.wikipedia.org/wiki/Grave_accent:

Some variations of Markdown support “fenced code blocks” that span multiple lines of code, starting (and ending) with three backticks in a row (```).

Thanks.
Now I have stored the info in a text file available on my desktop.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) vendredi 26 juillet 2019 15:39:35

Revisiting this, I’m try to find out if there’s a simple way to extract the relative day from a future date.

For example, based on the current date (10/4/24):

Oct. 3, 2024 --Yesterday
Oct. 4, 2024 – Today
Oct. 5, 2024 – Tomorrow

It looks like that’s been solved and if so it would be much better than writing an appleScript handler to do it.

Never mind, I found it with some googling.

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…

(Thanks again, Shane!)