class_docstr: File handler for the ASCAT Soil Moisture BUFR product.
class_docstr_tok: ["File","handler","for","the","ASCAT","Soil","Moisture","BUFR","product","."]
docstr: Extract the minimum and maximum dates from a single bufr message.
docstr_tok: ["Extract","the","minimum","and","maximum","dates","from","a","single","bufr","message","."]
code: def extract_msg_date_extremes(
      self, bufr, date_min=None, date_max=None
  ):
      """Extract the minimum and maximum dates from a single bufr message."""
      ec.codes_set(bufr, "unpack", 1)
      size = ec.codes_get(bufr, "numberOfSubsets")
      years = np.resize(ec.codes_get_array(bufr, "year"), size)
      months = np.resize(ec.codes_get_array(bufr, "month"), size)
      days = np.resize(ec.codes_get_array(bufr, "day"), size)
      hours = np.resize(ec.codes_get_array(bufr, "hour"), size)
      minutes = np.resize(ec.codes_get_array(bufr, "minute"), size)
      seconds = np.resize(ec.codes_get_array(bufr, "second"), size)
      for year, month, day, hour, minute, second in zip(
          years, months, days, hours, minutes, seconds
      ):
          time_stamp = datetime(year, month, day, hour, minute, second)
          date_min = (
              time_stamp if not date_min else min(date_min, time_stamp)
          )
          date_max = (
              time_stamp if not date_max else max(date_max, time_stamp)
          )
      return date_min, date_max
  
file_path: satpy/satpy/readers/ascat_l2_soilmoisture_bufr.py
imports: import logging
  from datetime import datetime
  import dask.array
  import numpy
  import xarray
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 5 for calling the AscatSoilMoistureBufr obj's underlying member method code with example usage: obj.extract_msg_date_extremes(bufr, date_min, date_max) and returns: date_min,  date_max