code: def format_py2js(cls, datetime_format):
          
          for js_format, py_format in cls.format_map:
              datetime_format = datetime_format.replace(py_format, js_format)
          return datetime_format
docs: Convert python datetime format to moment datetime format.