The @earliest function is a good match, but unfortunately it indeed only supports two dates.
You can however, use the following:
- In your Content Body (assuming
#date^dates is the repeating list):
Then add an
earliest-of-dates custom function with the following content:
(defn earliest-date [d1 d2]
(let [d1 (or (:date d1) d1) ; unbox param
d2 (or (:date d2) d2)]
(cond (< (:year d1) (:year d2)) d1
(> (:year d1) (:year d2)) d2
(< (:month d1) (:month d2)) d1
(> (:month d1) (:month d2)) d2
(< (:day d1) (:day d2)) d1
(> (:day d1) (:day d2)) d2
(reduce earliest-date $1)
Don’t be too concerned about that funny looking function in the previous step, it is quite advanced programming. Essentially, the content body will invoke the custom function
earliest-of-dates, pass it your repeating list, and then get back the earliest of all the dates that happen to be present in that repeating list.
Tip: the “Custom functions” is hidden by default. I just upgraded your rights so that you can see access it; you may have to refresh your browser page.