def datify(str)
      pttrn = /(\d+)[\/-](\d+)[\/-](\d+)(\W+(\d+)\:(\d+))?/
      day, month, year, dummy, hour, min = str.match(pttrn).captures.map {|d| d ? d.to_i : 0 }
      case year
      when 0..69
        year += 2000
      when 70..99
        year += 1900
      end
      DateTime.civil year, month, day, hour, min
    end
def datify(str)
      pttrn = /(\d+)[\/-](\d+)[\/-](\d+)(\W+(\d+)\:(\d+))?/
      day, month, year, dummy, hour, min = str.match(pttrn).captures.map {|d| d ? d.to_i : 0 }
      case year
      when 0..69
        year += 2000
      when 70..99
        year += 1900
      end
      DateTime.civil year, month, day, hour, min
    end
Extracts and returns the first provable DateTime from a string