How to get all future ''end'' dates of a recurring event?

From semantic-mediawiki.org

Probably identical to this thread.

If this is about getting all future events do something like

{{#ask:
 [[Eventname::John Doe]]
 [[Has date::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}]]
 |?Has date#ISO
 |sort=Has date
 |order=ascending
 |format=table
}}

If this is about getting just the last of the future events do something like:

{{#ask:
 [[Eventname::John Doe]]
 [[Has date::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}]]
 |?Has date#ISO
 |sort=Has date
 |order=ascending
 |format=table
 |offset={{#expr:
  {{#ask:
   [[Eventname::John Doe]]
   [[Has date::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}]]
   |format=count
  }}
  -1
 }}
}}

See here for a live example.

18:41, 2 January 2019