skillfed

moment

Dealing with dates and times should be easy

moment v0.12.1 310.1K downloads/30d#7,748 on PyPI741
Permissive license MIT Abandoned released

What it is and what it does

Moment is a wrapper around Python's datetime that provides a fluent, chainable API for date and time manipulation inspired by Moment.js. It uses dateparser to handle natural-language date strings like "2 weeks ago" or "December 18, 2012", and integrates pytz for timezone handling. You can parse dates from strings, Unix timestamps, or datetime objects; add or subtract time units; replace specific components; and format output using either Moment.js-style or strftime-style format strings.

The package is explicitly marked as beta-quality software and has been abandoned since 2020, with the maintainer recommending arrow or pendulum as alternatives in the installation documentation. It supports Python 2.7 and 3.6–3.7 according to its classifiers, and has received no updates in over five years despite having 741 GitHub stars.

Use it for:

  • Parse user-friendly date strings like "next Monday" or "3 days ago" without manual format specification
  • Chain date operations (add weeks, subtract days, replace hours) in a single readable expression
  • Convert between timezones and format dates for display using Moment.js-compatible format strings
  • Build date arithmetic into scripts where readability matters more than raw performance

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python library for parsing, manipulating, and formatting dates and times with a fluent API inspired by Moment.js, using dateparser, pytz, and times under the hood.

No. While the package has low install friction and a permissive license, it is abandoned (last release 2020-11-27, no commits since 2023-04-24) and explicitly marked as beta-quality. The maintainer recommends arrow or pendulum instead. For new projects, choose an actively maintained alternative; for legacy code already using moment, consider migrating to reduce long-term maintenance risk.

Install

moment on PyPI

pip

pip install moment

uv

uv add moment

poetry

poetry add moment

Installing moment

Before you install

Low install friction with a pure-Python wheel, but the package is abandoned as of 2020-11-27 with no commits since 2023-04-24. The last release was over 5 years ago and the project is marked as beta-quality software. The maintainer's own documentation recommends considering arrow or pendulum as alternatives.

License in practice

MIT license is permissive and imposes no restrictions on commercial or private use, modification, or distribution, only requiring attribution.

Quickstart

pip install moment

import moment

# Parse a natural-language date string
moment.date("2 weeks ago")

# Chain operations and format
moment.now().add(days=5).format("YYYY-M-D")

Verify before relying

  • Whether the package's dependencies (dateparser, pytz, times) are themselves maintained and compatible with current Python versions
  • Whether the abandoned status and lack of updates since 2020 create compatibility issues with modern Python or dependency versions
  • How well the package handles edge cases in date parsing compared to actively maintained alternatives

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — dateparser, pytz, times
Maintenance abandoned — 2,086 days since the last release
Last repo commit
First released
Downloads 310,094/month — #7,748 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: moment-0.12.1-py3-none-any.whl

Keywords: moment, dates, times, zachwill

Development Status :: 1 - PlanningIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7

Tags

date time parsing librarymoment.js python equivalentfluent date manipulationnatural language date parsingtimezone-aware datetime wrapperchainable date operationshuman-readable date formatting
abandoneddate-time-parsing

More Utilities packages