Issue #1777412: extended year range of strftime down to 1000.
diff --git a/Lib/datetime.py b/Lib/datetime.py
index 29ffe24..47e54ec 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -173,9 +173,9 @@
 # Correctly substitute for %z and %Z escapes in strftime formats.
 def _wrap_strftime(object, format, timetuple):
     year = timetuple[0]
-    if year < 1900:
-        raise ValueError("year=%d is before 1900; the datetime strftime() "
-                         "methods require year >= 1900" % year)
+    if year < 1000:
+        raise ValueError("year=%d is before 1000; the datetime strftime() "
+                         "methods require year >= 1000" % year)
     # Don't call utcoffset() or tzname() unless actually needed.
     freplace = None # the string to use for %f
     zreplace = None # the string to use for %z
@@ -1189,7 +1189,7 @@
         """Format using strftime().  The date part of the timestamp passed
         to underlying strftime should not be used.
         """
-        # The year must be >= 1900 else Python's strftime implementation
+        # The year must be >= 1000 else Python's strftime implementation
         # can raise a bogus exception.
         timetuple = (1900, 1, 1,
                      self._hour, self._minute, self._second,
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index b5822cc..4b5c890 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -1284,10 +1284,10 @@
         self.assertTrue(self.theclass.max)
 
     def test_strftime_out_of_range(self):
-        # For nasty technical reasons, we can't handle years before 1900.
+        # For nasty technical reasons, we can't handle years before 1000.
         cls = self.theclass
-        self.assertEqual(cls(1900, 1, 1).strftime("%Y"), "1900")
-        for y in 1, 49, 51, 99, 100, 1000, 1899:
+        self.assertEqual(cls(1000, 1, 1).strftime("%Y"), "1000")
+        for y in 1, 49, 51, 99, 100, 999:
             self.assertRaises(ValueError, cls(y, 1, 1).strftime, "%Y")
 
     def test_replace(self):