Skip to content

BridgeTime — Datetime Toolkit

Familiar Date APIs, Native Rust Speed
bridgetime on PyPIbridgetime on npmGitHub stars
5Locale Packsen, fr, es, de, pt included
BatchParse / Format APIsfast vectorized-style operations
1 corePython + Nodesame behavior across both bindings

BridgeTime gives you a Day.js/Moment-style developer experience with a Rust core under the hood.
Use the same concepts in Python and Node.js while keeping execution fast and deterministic.

Terminal window
pip install bridgetime
from bridgetime import bridge_time, bridge_duration
now = bridge_time.now("UTC")
future = now.add(2, "week").start_of("day")
print(future.format("YYYY-MM-DD HH:mm:ss"))
# Locale + calendar output
print(future.calendar(locale="fr"))
# Batch formatting
rows = bridge_time.format_batch(
["2026-01-02T10:00:00Z", "2026-01-03T15:30:00Z"],
"YYYY-MM-DD",
"UTC",
)
print(rows)
duration = bridge_duration(90, "minute")
print(duration.humanize(True))


  • bridge_time.now(tz)
  • bridge_time.parse(iso_string, tz?)
  • bridge_time.parse_format(input, pattern, tz?)
  • bridge_time.from_array([year, month, day, h, m, s, ms], tz?)
  • bridge_time.parse_batch(inputs, tz?)
  • .format("YYYY-MM-DD HH:mm:ss")
  • .to_iso()
  • bridge_time.format_locale(input, format, locale, tz?)
  • bridge_time.calendar(input, locale?, tz?)
  • bridge_time.format_batch(inputs, format, tz?)
  • .add(value, unit) / .subtract(value, unit)
  • .start_of(unit) / .end_of(unit)
  • .diff(other, unit, float?)
  • .is_before(other) / .is_after(other) / .is_same(other)
  • .is_between(start, end, unit?, inclusivity?)
  • .clamp(start, end)
  • .to_timezone(iana_name)
  • .utc_offset() / .is_utc() / .is_dst()
  • .year() .month() .date() .day() .hour() .minute() .second()
  • .days_in_month() / .is_leap_year() / .day_of_year()
  • .quarter() / .week() / .iso_week() / .iso_weekday()
  • .from_now() / .to_now()
  • .is_today() / .is_yesterday() / .is_tomorrow()
  • bridge_duration(value, unit)
  • .humanize(with_suffix?)
  • .add_duration(duration) / .subtract_duration(duration)

Use BridgeTime in Production Workflows

Keep a familiar API for app developers while moving date logic to a fast Rust runtime shared by Python and Node.js.