if (typeof query.timeframe.start === 'string')
        query.timeframe.start = new Date(query.timeframe.start);