Recent and upcoming

i have data like this:

(from 1.yaml)
title: ABC
what: solo
venue: 1 Pennsylvania Ave.
when: 2018-11-12
who: Frank Zappa

(from 2.yaml)
title: XYZ
what: group
venue: 13 Pennsylvania Ave.
when: 2019-01-23
who: Captain Beefheart

i would like to show recent and upcoming events… so say things that happened a month ago, things that are ongoing, and upcoming things in the future

how can i do this

i solved it simply by:

{{ range first 12 (sort .Site.Data ".when" "desc") }}
  {{ if eq .what "solo" }}
    {{ .title }}
  {{ end }}
{{ end }}