[Solved] CalendarEvent().between is undefined

question

#1

Please see the code:

let calendarName = "My calendar"
let cal = await Calendar.forEventsByTitle(calendarName)

// Works fine https://talk.automators.fm/t/1401
let e = await CalendarEvent.thisWeek([cal])

// Error: Cannot call a class constructor without |new|
let e = await CalendarEvent().between(new Date("2019"), new Date(), [cal])

// Error: new CalendarEvent().between is not a function
let e = await new CalendarEvent().between(new Date("2019"), new Date(), [cal])

#2

CalendarEvent().between should be
CalendarEvent.between