Hi,
I have a project that I will automate annually.

I'm trying to find an efficient way to store last year (the data year) in a local macro. I have a solution but it seems inelegant. Here is my code:

local year =yofd(date("$S_DATE", "DMY"))
local year = `year'-1
di "`year'"

Is there a better way to do this? is there an $S_YEAR or something similar?

Thanks in advance!