query transaction by date range
497800
def query_transactions(self, initial_date, final_date,
                           page=None,
                           max_results=None):
        
        last_page = False
        results = []
        while last_page is False:
            search_result = self._consume_query_transactions(
                initial_date, final_date, page, max_results)
            results.extend(search_result.transactions)
            if search_result.current_page is None or \
               search_result.total_pages is None or \
               search_result.current_page == search_result.total_pages:
                last_page = True
            else:
                page = search_result.current_page + 1

        return results
475326
def transaction_group(transaction)
      { requested_date:   transaction.requested_date,
        local_instrument: transaction.local_instrument,
        sequence_type:    transaction.sequence_type,
        batch_booking:    transaction.batch_booking,
        account:          transaction.creditor_account || account
      }
    end
95808
def query_decimals(self, asset: str) -> int:
        
        contract_address = self.get_asset_address(asset)
        invoke_code = build_native_invoke_code(contract_address, b'\x00', 'decimals', bytearray())
        tx = Transaction(0, 0xd1, int(time()), 0, 0, None, invoke_code, bytearray(), list())
        response = self.__sdk.rpc.send_raw_transaction_pre_exec(tx)
        try:
            decimal = ContractDataParser.to_int(response['Result'])
            return decimal
        except SDKException:
            return 0
1140999
def add_filter_by_date(self, query, out_params):
        
        date_query = formatDateQuery(self.context, 'Requested')
        if date_query:
            query['created'] = date_query
            requested = formatDateParms(self.context, 'Requested')
            out_params.append({'title': _('Requested'),
                               'value': requested,
                               'type': 'text'})
469261
def fetch_deposits(self, limit: int) -> List[Deposit]:
        """"""
        return self._transactions(self._deposits, 'deposits', limit)
1346817
def fetch_withdrawals_since(self, since: int) -> List[Withdrawal]:
        """"""
        return self._transactions_since(self._withdrawals_since, 'withdrawals', since)
395995
def get_transactions(self, include_investment=False):
        """"""
        assert_pd()
        s = StringIO(self.get_transactions_csv(
            include_investment=include_investment))
        s.seek(0)
        df = pd.read_csv(s, parse_dates=['Date'])
        df.columns = [c.lower().replace(' ', '_') for c in df.columns]
        df.category = (df.category.str.lower()
                       .replace('uncategorized', pd.np.nan))
        return df
874447
def _get_date_range_query(self, start_date, end_date, timespan= 'DAY', date_field= None):
        '''
        
        '''
        if date_field is None:
            date_field = self._date_field
        query ={'q':'*:*',
                'rows':0,
                'facet':'true',
                'facet.range': date_field,
                'facet.range.gap': '+1{}'.format(timespan),
                'facet.range.end': '{}'.format(end_date),
                'facet.range.start': '{}'.format(start_date),
                'facet.range.include': 'all'
                }
        if self._per_shard:
            query['distrib'] = 'false'
        return query
1076305
private function formatTransactionData($order, $transaction, $amount)
    {
        return [
            'Time' => $this->timezone->formatDateTime(
                date('Y-m-d H:i:s', $transaction->date / 1000),
                2,
                2
            ),
            'Reference' => $transaction->reference,
            'Amount' => $order->getBaseCurrency()->formatTxt($amount / 100),
            'Transaction ID' => $transaction->id
        ];
    }
187130
def get_by_id(self, tx_id: str) -> ScheduledTransaction:
        
        return self.query.filter(ScheduledTransaction.guid == tx_id).first()
461795
function TransactionDate (dateString, format, options) {
  options = options || {}
  var parsed = parseDate(dateString, format)

  this.year = parsed.year
  this.month = parsed.month
  this.date = parsed.date

  if (!this.year && options.succeedingDate) {
    this.year = this.calculateYear(options.succeedingDate)
  }
}
704865
def query_transaction_by_filter(filter)
      index_of_value = filter.calculate_index_of_value
      if index_of_value.nil?
        return make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end

      case index_of_value
      when Enums::TransactionFilter::TRANSACTION_ID_INDEX
        query_transaction_by_id(filter.transaction_id.to_s)
      when Enums::TransactionFilter::ACCESS_CODE_INDEX
        query_transaction_by_access_code(filter.access_code)
      when Enums::TransactionFilter::INVOICE_NUMBER_INDEX
        query_transaction_with_path(filter.invoice_number, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_NUM_METHOD)
      when Enums::TransactionFilter::INVOICE_REFERENCE_INDEX
        query_transaction_with_path(filter.invoice_reference, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_REF_METHOD)
      else
        make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end
    end
175048
def query_expired(cls, dt, bucket=None):
        """"""
        q = cls.query.filter(cls.created < dt).filter_by(completed=True)
        if bucket:
            q = q.filter(cls.bucket_id == as_bucket_id(bucket))
        return q
408187
def in_transaction(self):
        """"""
        if not hasattr(self.local, 'tx'):
            return False
        return len(self.local.tx) > 0
837342
def fetch_deposits_since(self, since: int) -> List[Deposit]:
        """"""
        return self._transactions_since(self._deposits_since, 'deposits', since)
1190647
def query(self, req) -> ResponseQuery:
        """"""
        v = encode_number(self.txCount)
        return ResponseQuery(code=CodeTypeOk, value=v, height=self.last_block_height)
282739
def transaction_date(self, value):
        
        if value:
            self._transaction_date = parse(value).date() if isinstance(value, type_check) else value