Skip to content

Commit 402d2d9

Browse files
committed
additional %D test
1 parent 6da69b6 commit 402d2d9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_strptime.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,13 @@ def test_strptime_T_format(self):
663663
time.strptime(test_time, "%H:%M:%S")
664664
)
665665

666+
def test_strptime_D_format(self):
667+
test_date = "10/26/2025"
668+
self.assertEqual(
669+
time.strptime(test_date, "%D"),
670+
time.strptime(test_date, "%m/%d/%Y")
671+
)
672+
666673
class Strptime12AMPMTests(unittest.TestCase):
667674
"""Test a _strptime regression in '%I %p' at 12 noon (12 PM)"""
668675

0 commit comments

Comments
 (0)