def generate_dates(solr_doc)
    
    # This will check for valid dates, but it seems most of the dates are currently invalid....
    #date_check =  /^(19|20)\d\d([- \/.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])/

   #if there is not date_t, add on with easy-to-find value
   if solr_doc[:date_t].nil?
        ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :date_t, "9999-99-99")
   end #if

    # Grab the date value from date_t regardless of wheter it is inside of an array
    # then convert it to a Date object
    date_value =    solr_doc[:date_t]
    if date_value.kind_of? Array
      date_value = date_value.first
    end
    date_obj = Date._parse(date_value)
    
    if date_obj[:mon].nil? 
       ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :month_facet, "99")
    elsif 0 < date_obj[:mon] && date_obj[:mon] < 13
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :month_facet, date_obj[:mon].to_s.rjust(2, '0'))
    else
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :month_facet, "99")
    end
      
    if  date_obj[:mday].nil?
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :day_facet, "99")
    elsif 0 < date_obj[:mday] && date_obj[:mday] < 32   
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :day_facet, date_obj[:mday].to_s.rjust(2, '0'))
    else
       ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :day_facet, "99")
    end
    
    return solr_doc
        
  end
def generate_dates(solr_doc)
    
    # This will check for valid dates, but it seems most of the dates are currently invalid....
    #date_check =  /^(19|20)\d\d([- \/.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])/

   #if there is not date_t, add on with easy-to-find value
   if solr_doc[:date_t].nil?
        ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :date_t, "9999-99-99")
   end #if

    # Grab the date value from date_t regardless of wheter it is inside of an array
    # then convert it to a Date object
    date_value =    solr_doc[:date_t]
    if date_value.kind_of? Array
      date_value = date_value.first
    end
    date_obj = Date._parse(date_value)
    
    if date_obj[:mon].nil? 
       ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :month_facet, "99")
    elsif 0 < date_obj[:mon] && date_obj[:mon] < 13
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :month_facet, date_obj[:mon].to_s.rjust(2, '0'))
    else
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :month_facet, "99")
    end
      
    if  date_obj[:mday].nil?
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :day_facet, "99")
    elsif 0 < date_obj[:mday] && date_obj[:mday] < 32   
      ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :day_facet, date_obj[:mday].to_s.rjust(2, '0'))
    else
       ::Solrizer::Extractor.insert_solr_field_value(solr_doc, :day_facet, "99")
    end
    
    return solr_doc
        
  end
This method generates the month and day facets from the date_t in solr_doc