old_contents: from babel.dates import format_date
  
  from .. import app
  
  
  @app.template_filter()
  def dateformat(d, date_format="long", lang="en"):
      """Print a date in a given locale."""
      return format_date(d, date_format, lang)
  
new_contents: from babel.dates import format_date
  
  from .. import app
  
  
  @app.template_filter()
  def dateformat(d, date_format="long", lang="en"):
      """Print a date in a given locale."""
      if lang == 'fa':
          return format_date(d, "short", lang)
      return format_date(d, date_format, lang)
  
subject: use short date format for persian