No viable alternative at input 'between'

Just try to use an exponent-sign e.g.

var myVar = java.time.Duration.^between(myItem.lastUpdate(), now).toDays()

and have a look on this thread

Hope this can help

Cheers - Peter