def format_py2js(cls, datetime_format):
        """Convert python datetime format to moment datetime format."""
        for js_format, py_format in cls.format_map:
            datetime_format = datetime_format.replace(py_format, js_format)
        return datetime_format
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
Convert python datetime format to moment datetime format.