input: Write a python function to check if two dates are within one year of each other.
  assert within_year("01-01-2022", "31-12-2022") == True
  assert within_year("01-01-2022", "01-01-2023") == True
  assert within_year("01-01-2022", "02-01-2023") == False
  assert within_year("28-02-2021", "28-02-2022") == True
output: def within_year(date1, date2):
      from datetime import datetime, timedelta
      
      date_format = "%d-%m-%Y"
      d1 = datetime.strptime(date1, date_format)
      d2 = datetime.strptime(date2, date_format)
      
      return abs((d2 - d1).days) <= 365