Human-friendly date and time utilities for Mojo. Morrow provides an Arrow-inspired API for creating, parsing, formatting, shifting, comparing, and humanizing date-time values.
Language: English | 䏿–‡
Documentation: https://mojoto.github.io/morrow.mojo/
Download morrow.mojopkg from
releases, build it from this
repository, or vendor the morrow directory in your Mojo project.
make install
make buildWhen using the source directory directly, add the project root to Mojo's import path:
uv run mojo run -I . main.mojofrom morrow import FORMAT_RSS, Morrow, TimeZone
def main() raises:
var now = Morrow.now()
print(now)
var utc = Morrow.utcnow()
print(utc)
var parsed = Morrow.get("2026-01-01 03:04:05Z")
print(parsed)
print(parsed.format("YYYY-MM-DD HH:mm:ss ZZ"))
var beijing = parsed.to("+08:00")
print(beijing)
var hour = beijing.span("hour")
print(hour)
print(beijing.isocalendar())
print(beijing.timetuple())
var rss = Morrow(2026, 1, 1, 10, 30, 35, 0, TimeZone(0, "UTC"))
print(rss.format(FORMAT_RSS))Morrow is UTC by default, supports fixed-offset time zones, parses ISO 8601
strings and POSIX timestamps, and formats values with Arrow-style tokens or
Python-style strftime.
Install uv, then:
make install # Install Mojo into .venv
make test # Run tests
make format # Format sources and tests
make build # Build morrow.mojopkg
make doc-install # Install documentation dependencies
make doc-serve # Serve the built documentation siteLocal docs are served under /morrow.mojo/; Chinese docs are at http://localhost:3000/morrow.mojo/zh-Hans/.