DateFormat(format_elements, date_separator) creates a format with the specified date separator; format_elements is a list of DateFormatElement values. Month names, if the format contains them, are taken from the current culture.
fromgroupdocs.search.optionsimportDateFormat,DateFormatElement# German culture with month nameselements=[DateFormatElement.DAY_OF_MONTH_TWO_DIGITS,DateFormatElement.DATE_SEPARATOR,DateFormatElement.MONTH_FULL_NAME,DateFormatElement.DATE_SEPARATOR,DateFormatElement.YEAR_FOUR_DIGITS,]date_format=DateFormat("de-DE",elements)# Custom separatorelements2=[DateFormatElement.MONTH_TWO_DIGITS,DateFormatElement.DATE_SEPARATOR,DateFormatElement.DAY_OF_MONTH_TWO_DIGITS,DateFormatElement.DATE_SEPARATOR,DateFormatElement.YEAR_FOUR_DIGITS,]date_format2=DateFormat(elements2,"/")