Integrated Martian datetime and calendar support for Python
Project description
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}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mars_dtc-0.1.3.tar.gz.
File metadata
- Download URL: mars_dtc-0.1.3.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e75488fb2a1475305a8833b36fed7e74b86f235cacdc0650e553be792f472ccb
|
|
| MD5 |
e19f3a4a159f632d4a6c3a7c5eb57513
|
|
| BLAKE2b-256 |
c280278e5ea139cbfa7da2ac52232931ede070f0a8b5d4569810b39e57bd79aa
|
File details
Details for the file mars_dtc-0.1.3-py3-none-any.whl.
File metadata
- Download URL: mars_dtc-0.1.3-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4518d2176b451d3f1cd2c2a96eb7456697fdc7ee55092eb23ae207bca328503
|
|
| MD5 |
9b6f96624c532b558cb96bf13e4b0f1e
|
|
| BLAKE2b-256 |
1814bd7d311c2ceca069f3400bedcb6a3b144ac3149cb24a616b0afbf28ee28f
|