--- id: flask-moment version: "1.0.6" license: unclear license_treatment: permissive maintenance: active --- # Flask-Moment — Formatting of dates and times in Flask templates using moment.js. License: permissive · Maintenance: active · Downloads: 147.1K/mo ## What it is and what it does Flask-Moment is a Flask extension that integrates moment.js into your Jinja2 templates, allowing you to format dates and times directly in template markup. Instead of formatting timestamps in Python and passing strings to templates, you pass datetime objects and use Flask-Moment's template functions to render them as human-readable text—relative times like 'a few seconds ago', formatted dates, durations, and more—all processed by moment.js in the browser. The package depends on Flask and packaging, and requires Python 3.6 or later. It's designed for web applications where you want flexible, locale-aware date and time display without server-side formatting overhead. The extension integrates into your template layer, making it straightforward to add moment.js capabilities to existing Flask projects. Use it for: - Display relative timestamps in activity feeds or comment sections without server-side recalculation. - Render dates and times in user-preferred formats and locales directly in templates. - Show countdown timers or duration displays that update in the browser using moment.js. - Format timestamps in API responses for display in Flask-rendered HTML without extra logic. - Build dashboards where timestamps need to update client-side as time passes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Flask-Moment adds moment.js date and time formatting to Jinja2 templates, letting you render human-readable timestamps directly in your Flask application's HTML. Yes. Flask-Moment is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a common Flask templating need cleanly. The MIT license poses no restrictions. Install it if you need flexible date and time rendering in your Flask templates. ## Install pip install flask-moment uv add flask-moment poetry add flask-moment ## Installing Flask-Moment Before you install: Low friction install with only Flask and packaging as runtime dependencies. Actively maintained with recent commits and stable since initial release. License in practice: MIT license is permissive; you can use this in commercial and private projects with minimal restrictions. Quickstart: pip install Flask-Moment from flask import Flask from flask_moment import Moment app = Flask(__name__) moment = Moment(app) Requires Python 3.6 or later; moment.js must be loaded in your HTML template separately. Verify before relying: - Whether moment.js is bundled or must be loaded separately in templates - Supported moment.js versions and any version compatibility constraints - Performance implications of rendering large numbers of timestamps ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 147.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flask template date formatting, moment.js jinja2 integration, flask datetime rendering, human readable timestamps flask, relative time display flask, flask template time helpers, moment.js flask extension, flask-extension, template-rendering, datetime-formatting [View on SkillFed](https://skillfed.io/packages/flask-moment) · [View on PyPI](https://pypi.org/project/flask-moment/)