From 0e42aef3da802de80c14c6681bf31f8176ef326c Mon Sep 17 00:00:00 2001 From: mwinter Date: Sun, 24 Sep 2023 10:42:02 +0200 Subject: [PATCH] upcoming events based on dynamic date --- portfolio-nuxt/layouts/default.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/portfolio-nuxt/layouts/default.vue b/portfolio-nuxt/layouts/default.vue index 7742666..376af67 100644 --- a/portfolio-nuxt/layouts/default.vue +++ b/portfolio-nuxt/layouts/default.vue @@ -58,8 +58,9 @@ } //const upcoming_events = [{"_id":{"$oid":"64de3967cdd55b0007a4d073"},"start_date":{"$date":1694894400201},"venue":{"name":"Music and the Wende, Now @ G\u0327ertru\u0304des Street Theatre","city":"Rīga","state":"LV"},"program":[{"work":"remembering clive wearing","performers":[{"name":"Michael Winter","instrument_tags":["reader","lights","computer"]}]},{"work":"ida for amy","performers":[{"name":"Lucie Nezri","instrument_tags":["piano"]},{"name":"Edgars Rubenis","instrument_tags":["guitar"]}]},{"work":"preliminary thoughts","performers":[{"name":"Michael Winter","instrument_tags":["guitar"]},{"name":"Ernests Vilsons","instrument_tags":["reader"]}]}],"program_file":"","flyer":"","links":[],"legacy_program":"","legacy_performers":""},{"_id":{"$oid":"64de3866cdd55b0007a4d072"},"start_date":{"$date":1694548800201},"venue":{"name":"Music and the Wende, Now @ Pegaza Pagalms","city":"Liepāja","state":"LV"},"program":[{"work":"lv","performers":[{"name":"Rihards Plešanovs","instrument_tags":["piano"]}]},{"work":"a chance happening...","performers":[{"name":"Rihards Plešanovs","instrument_tags":["piano"]}]},{"work":"partition and gate","ensemble":"MPLab","performers":[]}],"program_file":"","flyer":"","links":[],"legacy_program":"","legacy_performers":""},{"_id":{"$oid":"64de3766cdd55b0007a4d071"},"start_date":{"$date":1694289600201},"venue":{"name":"Music and the Wende, Now @ Aleponija","city":"Rīga","state":"LV"},"program":[{"work":"ostinato and interrupt","performers":[{"name":"edgars rubenis","instrument_tags":["guitar"]}]},{"work":"necklaces","performers":[{"name":"edgars rubenis","instrument_tags":["guitar"]}]}],"program_file":"","flyer":"","links":[],"legacy_program":"","legacy_performers":""},{"_id":{"$oid":"64bf851695cfda0007250928"},"start_date":{"$date":1696795200201},"venue":{"name":"Riverun Festival @ Centre National de Création Musicale","city":"Albi","state":"FR"},"program":[{"work":"Counterfeiting in Colonial Connecticut","performers":[{"name":"Elliot Simpson","instrument_tags":["guitar"]}]}],"program_file":"","flyer":"","links":[],"legacy_program":"","legacy_performers":""},{"_id":{"$oid":"64bf840a95cfda0007250927"},"start_date":{"$date":1700769600201},"venue":{"name":"KM28","city":"Berlin","state":"DE"},"program":[{"work":"a history of the domino problem","ensemble":"Kali Ensemble","performers":[]}],"program_file":"","flyer":"","links":[],"legacy_program":"","legacy_performers":""},{"_id":{"$oid":"64bf83c195cfda0007250926"},"start_date":{"$date":1700683200201},"venue":{"name":"Humboldt University","city":"Berlin","state":"DE"},"program":[{"work":"a history of the domino problem","ensemble":"Kali Ensemble","performers":[]}],"program_file":"","flyer":"","links":[],"legacy_program":"","legacy_performers":""}] + //1692298623411 - const { data: upcoming_events } = await useFetch("https://unboundedpress.org/api/events?filter={'start_date':{'$gte':{'$date':1692298623411}}}", { + const { data: upcoming_events } = await useFetch("https://unboundedpress.org/api/events?filter={'start_date':{'$gte':{'$date':" + Date.now() + "}}}", { transform: (upcoming_events) => { for (const event of upcoming_events) { let date = new Date(event.start_date.$date)