Hi Jay,
I'm sorry for the long delay in writing back -- I was travelling and let my email get away from me. I'm doing something kind of similar but not exactly the same. My problem is a little bit easier -- my dates aleays change by exactly a week, so what I have done is to retain the first date and just iteratively insert timestamps as i go. So I've written this defun:
(defun get-ts+7 ()
(interactive)
(let ((base-date (save-excursion
(re-search-backward
(org-re-timestamp 'all))
(match-string 0)))
(result nil))
(format-time-string "<%Y-%m-%d %a>"
(time-add
(date-to-time base-date) (days-to-time (1+ 7)))) ))
Then I have an org file like:
#+MACRO: ts (eval (get-ts+7))
* Week {{{n}}} <2017-09-17 Tue>
* Week {{{n}}} {{{ts}}}
* Week {{{n}}} {{{ts}}}
* Week {{{n}}} {{{ts}}}
You could modify my defun to take a parameter, maybe something like this:
(defun get-ts+7 (plusdays)
(interactive)
(let ((base-date "<2017-09-17>")
(result nil))
(format-time-string "<%Y-%m-%d %a>"
(time-add
(date-to-time base-date) (days-to-time (1+ plusdays)))) ))
But then you'd need to eval the defun every time. So maybe something like this:
#+MACRO: ts (eval (let ((base-date "<2017-09-17>")(result nil)) (format-time-string "<%Y-%m-%d %a>"(time-add (date-to-time base-date) (days-to-time (1+ plusdays)))) ))