class_docstr: This analyzer class analyzes datetime data and generates key stats for values fed into it
docstr: Feed the datetime str into analyzer and aggregate count based on resolution
  
  Args:
     value: datetime str
code: def feed(self, value: str):
      """
      Feed the datetime str into analyzer and aggregate count based on resolution
  
      Args:
         value: datetime str
  
      """
  
      def __parse_date(date):
          try:
              dt = dateutil.parser.parse(str(date))
              dt_obj = dict()
              dt_obj[DatetimeResolution.YEAR] = dt.year
              dt_obj[DatetimeResolution.MONTH] = dt.month
              dt_obj[DatetimeResolution.DAY] = dt.day
              dt_obj[DatetimeResolution.HOUR] = dt.hour
              dt_obj[DatetimeResolution.MINUTE] = dt.minute
              dt_obj[DatetimeResolution.SECOND] = dt.second
              dt_obj[DatetimeResolution.WEEKDAY] = dt.weekday()
              return dt_obj
          except ValueError:
              self.invalid_count += 1
              return None
  
      if type(value) not in DatetimeDataAnalyzer.SUPPORTED_TYPES:
          raise ItemDataTypeNotSupported(
              type(value),
              type(self),
              DatetimeDataAnalyzer.SUPPORTED_TYPES,
          )
      date_obj = __parse_date(value)
      if date_obj is not None:
          self._time_records.append(date_obj)
  
file_path: contextual-ai/xai/data/explorer/datetime/datetime_analyzer.py
imports: import dateutil
  from pandas import DataFrame
  from typing import List, Optional
  from xai.data.constants import DatetimeResolution
  from xai.data.exceptions import ItemDataTypeNotSupported, InconsistentSize
  from xai.data.explorer.abstract_analyzer import AbstractDataAnalyzer
  from xai.data.explorer.datetime.datetime_stats import DatetimeStats
label_desc: Use image node_id 2 for calling the DatetimeDataAnalyzer obj's underlying member method code with example usage: obj.feed(value) and returns: dt_obj, None