code: def test_dmy(d=english.dmy):
      assert_adatetime(
          d.date_from("25 may 2011", basedate),
          year=2011,
          month=5,
          day=25,
      )
      assert_adatetime(
          d.date_from("may 2 2011", basedate), year=2011, month=5, day=2
      )
      assert_adatetime(
          d.date_from("2011 25 may", basedate),
          year=2011,
          month=5,
          day=25,
      )
      assert_adatetime(
          d.date_from("2011 may 5", basedate), year=2011, month=5, day=5
      )
  
      assert_adatetime(d.date_from("apr", basedate), month=4)
      assert_adatetime(d.date_from("september", basedate), month=9)
      assert_adatetime(d.date_from("2001", basedate), year=2001)
      assert_adatetime(
          d.date_from("july 2525", basedate), year=2525, month=7
      )
      assert_adatetime(
          d.date_from("nov 30", basedate), month=11, day=30
      )
      assert d.date_from("25 2525", basedate) is None
  
      assert_adatetime(
          d.date_from("25 may, 2011", basedate),
          year=2011,
          month=5,
          day=25,
      )
      assert_adatetime(
          d.date_from("may 2nd, 2011", basedate),
          year=2011,
          month=5,
          day=2,
      )
      assert_adatetime(
          d.date_from("2011, 25 may", basedate),
          year=2011,
          month=5,
          day=25,
      )
      assert_adatetime(
          d.date_from("2011, may 5th", basedate),
          year=2011,
          month=5,
          day=5,
      )
  
      assert_adatetime(
          d.date_from("today", basedate), year=2010, month=9, day=20
      )
      assert_adatetime(
          d.date_from("tomorrow", basedate), year=2010, month=9, day=21
      )
      assert_adatetime(
          d.date_from("yesterday", basedate), year=2010, month=9, day=19
      )
      assert_adatetime(
          d.date_from("this month", basedate), year=2010, month=9
      )
      assert_adatetime(d.date_from("this year", basedate), year=2010)
  
      assert d.date_from("now", basedate) == basedate
  
file_path: whoosh/tests/test_dateparse.py
imports: from whoosh.qparser.dateparse import *
label_desc: Use image node_id 8 for calling a global function with example usage: test_dmy(d) without return types