def METHOD_NAME(format_name):
    f = get_format(format_name)
    if not isinstance(f, str):
        f = f[0]
    return toJavascriptOut_re.sub(
        lambda x: out_date_conversion_to_moment[x.group()],
        f
    )