imagine I have this domain class:
class Event {
DateTime startDate
DateTime endDate
}
I want to find Events that ended in the last 15 to 30 minutes. I would like to have something like:
def now = DateTime.now()
def events= Event.withCriteria {
ge("endDate".plusMinutes(15), now)
ge("endDate".plusMinutes(30), now)
}
you can do it also with plain Date magic