diff --git a/jmespath/visitor.py b/jmespath/visitor.py
index 75af885..6c7f0c4 100644
--- a/jmespath/visitor.py
+++ b/jmespath/visitor.py
@@ -1,6 +1,7 @@
 import operator
 
 from jmespath import functions
+from jmespath.compat import string_type
 
 
 def _equals(x, y):
@@ -33,6 +34,14 @@ def _is_special_integer_case(x, y):
         return x is True or x is False
 
 
+def _is_comparable(x):
+    # The spec doesn't officially support string types yet,
+    # but enough people are relying on this behavior that
+    # it's been added back.  This should eventually become
+    # part of the official spec.
+    return _is_actual_number(x) or isinstance(x, string_type)
+
+
 def _is_actual_number(x):
     # We need to handle python's quirkiness with booleans,
     # specifically:
@@ -142,8 +151,8 @@ class TreeInterpreter(Visitor):
             left = self.visit(node['children'][0], value)
             right = self.visit(node['children'][1], value)
             num_types = (int, float)
-            if not (_is_actual_number(left) and
-                    _is_actual_number(right)):
+            if not (_is_comparable(left) and
+                    _is_comparable(right)):
                 return None
             return comparator_func(left, right)
 

0.9.1 date comparisons not working
From https://gitter.im/jmespath/chat:
```
aws ec2 describe-snapshots --owner-id self --query 'Snapshots[?StartTime>='2017--02-01']'
The above command returns and empty set ( '[]' ) when run with v0.9.1, and a list of appropriate snapshots with run with v0.9.0.
```
I have the same problem fetching AMIs by date.  It appears Date comparisons (except ==) are broken in 0.9.1 (and work fine in 0.9.0)
diff --git a/tests/test_search.py b/tests/test_search.py
index 71ab3dc..c26a2fa 100644
--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -36,3 +36,10 @@ class TestSearchOptions(unittest.TestCase):
             jmespath.search('my_subtract(`10`, `3`)', {}, options=options),
             7
         )
+
+
+class TestPythonSpecificCases(unittest.TestCase):
+    def test_can_compare_strings(self):
+        # This is python specific behavior that's not in the official spec
+        # yet, but this was regression from 0.9.0 so it's been added back.
+        self.assertTrue(jmespath.search('a < b', {'a': '2016', 'b': '2017'}))

pip install -e .
parse_log_pytest
requirements.txt
pytest
3.5
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
coverage==3.7.1
distlib==0.3.9
filelock==3.4.1
hypothesis==3.1.0
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
-e git+https://github.com/jmespath/jmespath.py.git@de035093b7e52c6a6ea4411f41d2aec10d499dcb#egg=jmespath
nose==1.2.1
packaging==21.3
platformdirs==2.4.0
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
tomli==1.2.3
tox==1.4.2
typing_extensions==4.1.1
virtualenv==20.17.1
zipp==3.6.0

name: jmespath.py
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - coverage==3.7.1
      - distlib==0.3.9
      - filelock==3.4.1
      - hypothesis==3.1.0
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - nose==1.2.1
      - packaging==21.3
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - tomli==1.2.3
      - tox==1.4.2
      - typing-extensions==4.1.1
      - virtualenv==20.17.1
      - wheel==0.24.0
      - zipp==3.6.0
prefix: /opt/conda/envs/jmespath.py

tests/test_search.py::TestPythonSpecificCases::test_can_compare_strings
tests/test_search.py::TestSearchOptions::test_can_provide_custom_functions tests/test_search.py::TestSearchOptions::test_can_provide_dict_cls
jmespath/visitor.py
jmespath/visitor.py