mars-dtc: Integrated Mars Datetime and Calendar Support for Python.
mars-dtc is a Python library for representing and manipulating Martian dates and times.
This initial release implements the Darian calendar, which divides the Martian year into 24 months and accounts for leap sols. Future versions may include other proposed Martian calendar systems.
The library offers familiar functionality similar to Python’s datetime module. It integrates seamlessly with Pandas and Matplotlib, enabling analysis, visualization, and serialization of Martian temporal data.
Installation
pip install mars-dtc
Features
- Full implementation of the Darian calendar (24 months, 668–669 sols per year) in this initial relase.
- Core date and time classes:
MarsDatefor calendar datesMarsDateTimefor date–time precisionMarsTimedeltafor sol-based time deltas
- Arithmetic, comparisons, and rounding operations
- Serialization to and from JSON, YAML, and dictionaries
- Custom Pandas extension dtype for native column and Series support
- Integration with Matplotlib for native plotting
- Utilities for generating Martian date ranges and computing week or sol-of-year values
For the full set of features, see the demo notebook included, showing:
- Basic date and time creation
- Arithmetic and formatting
- JSON/YAML serialization
- Pandas operations
- Plotting with Matplotlib
Alongside the demo, we include an example dataset of parsed Martian weather data with Darian calendar dates to allows users to test the package’s functionality.
Citing mars-dtc
If you use mars-dtc in your publication, please cite it by using the following BibTeX entry.
@software{De_Lima_mars-dtc_Integrated_Mars_2025,
author = {De Lima, Victor},
month = oct,
title = {{mars-dtc: Integrated Mars Datetime and Calendar Support for Python}},
url = {https://purl.org/victordelima/mars-dtc},
year = {2025}
}
Metadata
Release files for mars-dtc 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mars_dtc-0.1.3.tar.gz | 18.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mars_dtc-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.6 kB
Release files / mars_dtc-0.1.3.tar.gz
| Download URL | mars_dtc-0.1.3.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e75488fb2a1475305a8833b36fed7e74b86f235cacdc0650e553be792f472ccb
|
|
BLAKE2b-256 checksum How to use checksums |
c280278e5ea139cbfa7da2ac52232931ede070f0a8b5d4569810b39e57bd79aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / mars_dtc-0.1.3-py3-none-any.whl
| Download URL | mars_dtc-0.1.3-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4518d2176b451d3f1cd2c2a96eb7456697fdc7ee55092eb23ae207bca328503
|
|
BLAKE2b-256 checksum How to use checksums |
1814bd7d311c2ceca069f3400bedcb6a3b144ac3149cb24a616b0afbf28ee28f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|