code: def test_reldate(p=english.plusdate):
      assert p.date_from("+1y", basedate) == basedate + relativedelta(
          years=1
      )
      assert p.date_from("+2mo", basedate) == basedate + relativedelta(
          months=2
      )
      assert p.date_from("+3w", basedate) == basedate + relativedelta(
          weeks=3
      )
      assert p.date_from("+5d", basedate) == basedate + relativedelta(
          days=5
      )
      assert p.date_from(
          "+5days", basedate
      ) == basedate + relativedelta(days=5)
  
      assert p.date_from("-6yr", basedate) == basedate + relativedelta(
          years=-6
      )
      assert p.date_from(
          "- 7 mons", basedate
      ) == basedate + relativedelta(months=-7)
      assert p.date_from(
          "-8 wks", basedate
      ) == basedate + relativedelta(weeks=-8)
      assert p.date_from(
          "- 9 dy", basedate
      ) == basedate + relativedelta(days=-9)
  
      assert p.date_from(
          "+1y 12mo 400d", basedate
      ) == basedate + relativedelta(years=1, months=12, days=400)
      assert p.date_from(
          "-7mo 8d", basedate
      ) == basedate + relativedelta(months=-7, days=-8)
      assert p.date_from(
          "+5wks 2d", basedate
      ) == basedate + relativedelta(weeks=5, days=2)
      assert p.date_from(
          "-1y 1w", basedate
      ) == basedate + relativedelta(years=-1, weeks=-1)
  
      assert p.date_from(
          "+1y 2d 5h 12s", basedate
      ) == basedate + relativedelta(
          years=1, days=2, hours=5, seconds=12
      )
  
file_path: whoosh/tests/test_dateparse.py
imports: from whoosh.qparser.dateparse import *
label_desc: Use image node_id 12 for calling a global function with example usage: test_reldate(p) without return types