class_docstr: An "ambiguous" datetime object. This object acts like a
  ``datetime.datetime`` object but can have any of its attributes set to
  None, meaning unspecified.
docstr: Returns a ``datetime`` version of this object with all unspecified
  (None) attributes replaced by their lowest values.
  
  This method raises an error if the ``adatetime`` object has no year.
  
  >>> adt = adatetime(year=2009, month=5)
  >>> adt.floor()
  datetime.datetime(2009, 5, 1, 0, 0, 0, 0)
docstr_tok: ["Returns","a","``","datetime","``","version","of","this","object","with","all","unspecified","(","None",")","attributes","replaced","by","their","lowest","values",".","This","method","raises","an","error","if","the","``","adatetime","``","object","has","no","year",".",">",">",">","adt","=","adatetime","(","year=2009",",","month=5",")",">",">",">","adt.floor","(",")","datetime.datetime","(","2009",",","5",",","1",",","0",",","0",",","0",",","0",")"]
code: def floor(self):
      """Returns a ``datetime`` version of this object with all unspecified
      (None) attributes replaced by their lowest values.
  
      This method raises an error if the ``adatetime`` object has no year.
  
      >>> adt = adatetime(year=2009, month=5)
      >>> adt.floor()
      datetime.datetime(2009, 5, 1, 0, 0, 0, 0)
      """
  
      y, m, d, h, mn, s, ms = (
          self.year,
          self.month,
          self.day,
          self.hour,
          self.minute,
          self.second,
          self.microsecond,
      )
  
      if y is None:
          raise ValueError("Date has no year")
  
      if m is None:
          m = 1
      if d is None:
          d = 1
      if h is None:
          h = 0
      if mn is None:
          mn = 0
      if s is None:
          s = 0
      if ms is None:
          ms = 0
      return datetime(y, m, d, h, mn, s, ms)
  
imports: import calendar
  import copy
  from datetime import date, datetime, timedelta
  from whoosh.compat import iteritems
label_desc: Use image node_id 8 for calling the adatetime obj's underlying member method code with example usage: obj.floor() and returns: datetime