code: def _calculate_format(self):
          
          _format = self.format_param if self.format_param else self.format
          if self.config['options'].get('format'):
              _format = self.format_js2py(self.config['options'].get('format'))
          else:
              self.config['options']['format'] = self.format_py2js(_format)
          return _format
docs: Calculate and Return the datetime format.