@staticmethod
def include_moment(version='2.5.1', local_js=None):
    js = ''
    if (local_js is not None):
        js = ('<script src="%s"></script>\n' % local_js)
    elif (version is not None):
        js = ('<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/%s/moment-with-langs.min.js"></script>\n' % version)
    return Markup(('%s<script>\nfunction flask_moment_render(elem) {\n    $(elem).text(eval(\'moment("\' + $(elem).data(\'timestamp\') + \'").\' + $(elem).data(\'format\') + \';\'));\n    $(elem).removeClass(\'flask-moment\');\n}\nfunction flask_moment_render_all() {\n    $(\'.flask-moment\').each(function() {\n        flask_moment_render(this);\n        if ($(this).data(\'refresh\')) {\n            (function(elem, interval) { setInterval(function() { flask_moment_render(elem) }, interval); })(this, $(this).data(\'refresh\'));\n        }\n    })\n}\n$(document).ready(function() {\n    flask_moment_render_all();\n});\n</script>' % js))
@staticmethod
def include_moment(version='2.5.1', local_js=None):
    js = 
    if (local_js is not None):
        js = ('<script src="%s"></script>\n' % local_js)
    elif (version is not None):
        js = ('<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/%s/moment-with-langs.min.js"></script>\n' % version)
    return Markup(('%s<script>\nfunction flask_moment_render(elem) {\n    $(elem).text(eval(\'moment("\' + $(elem).data(\'timestamp\') + \'").\' + $(elem).data(\'format\') + \';\'));\n    $(elem).removeClass(\'flask-moment\');\n}\nfunction flask_moment_render_all() {\n    $(\'.flask-moment\').each(function() {\n        flask_moment_render(this);\n        if ($(this).data(\'refresh\')) {\n            (function(elem, interval) { setInterval(function() { flask_moment_render(elem) }, interval); })(this, $(this).data(\'refresh\'));\n        }\n    })\n}\n$(document).ready(function() {\n    flask_moment_render_all();\n});\n</script>' % js))