class_docstr: This is a very thin subclass of :class:`NumericRange` that only
  overrides the initializer and ``__repr__()`` methods to work with datetime
  objects instead of numbers. Internally this object converts the datetime
  objects it's created with to numbers and otherwise acts like a
  ``NumericRange`` query.
  
  >>> DateRange("date", datetime(2010, 11, 3, 3, 0),
  ...           datetime(2010, 11, 3, 17, 59))
class_docstr_tok: ["This","is","a","very","thin","subclass","of",":","class",":","`","NumericRange","`","that","only","overrides","the","initializer","and","``","__repr__","(",")","``","methods","to","work","with","datetime","objects","instead","of","numbers",".","Internally","this","object","converts","the","datetime","objects","it","'s","created","with","to","numbers","and","otherwise","acts","like","a","``","NumericRange","``","query",".",">",">",">","DateRange","(","``","date","''",",","datetime","(","2010",",","11",",","3",",","3",",","0",")",",","...","datetime","(","2010",",","11",",","3",",","17",",","59",")",")"]
code: def __init__(
      self,
      fieldname,
      start,
      end,
      startexcl=False,
      endexcl=False,
      boost=1.0,
      constantscore=True,
  ):
      self.startdate = start
      self.enddate = end
      if start:
          start = datetime_to_long(start)
      if end:
          end = datetime_to_long(end)
      super(DateRange, self).__init__(
          fieldname,
          start,
          end,
          startexcl=startexcl,
          endexcl=endexcl,
          boost=boost,
          constantscore=constantscore,
      )
  
imports: from __future__ import division
  from whoosh.compat import b, u
  from whoosh.query import qcore, terms, compound, wrappers
  from whoosh.util.times import datetime_to_long
label_desc: Use image node_id 1 to create a new DateRange object from inherited base classes: NumericRange with example: obj = DateRange(fieldname, start, end, startexcl, endexcl, boost, constantscore)