Author: Behrouz Safari
License: MIT
cals
A python package for calendrical calculations
Installation
Install the latest version of cals from PyPI:
pip install cals
Requirements are numpy, scipy, pandas and requests.
Examples
Let's read a file:
>>> from cals import Gregorian, gregorian_from_jd
>>> g = Gregorian(2023, 2, 1, 2, 36, 15)
>>> g
Gregorian(2023, 2, 1, 2, 36, 15, 0)
>>> jd = g.to_jd()
>>> jd
2459976.6085069445
>>> date = gregorian_from_jd(2459976.5)
>>> date
Gregorian(2023, 2, 1, 0, 0, 0, 0)
>>> date.add_days(10)
>>> date
Gregorian(2023, 2, 11, 0, 0, 0, 0)
>>> date.to_persian()
Persian(1401, 11, 22, 0, 0, 0, 0)
>>>
>>> from cals import Persian, persian_from_jd
>>> p = Persian(1401, 11, 8, 15)
>>> p
Persian(1401, 11, 8, 15, 0, 0, 0)
>>> p.to_gregorian()
Gregorian(2023, 1, 28, 15, 0, 0, 0)
>>> p.to_jd()
2459973.125
>>> persian_from_jd(2459973.125)
Persian(1401, 11, 8, 15, 0, 0, 0)
>>> p.add_days(50)
>>> p
Persian(1401, 12, 28, 15, 0, 0, 0)
See more at astrodatascience.net
Metadata
Release files for cals 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cals-0.1.0.tar.gz | 9.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cals-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.6 kB
Release files / cals-0.1.0.tar.gz
| Download URL | cals-0.1.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2babb5f252b700d5a7a78b86db70dcb2be8de0c50c03a686024b6cef93dc2fe3
|
|
BLAKE2b-256 checksum How to use checksums |
bdf8df073b2bf8ec7382cf97f0b9051f7fce6ea417136a208cb69feae1d3f0d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Release files / cals-0.1.0-py3-none-any.whl
| Download URL | cals-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
109bebe33af34de19ecdf3039397968871aef6c02ef1e7a70ee0977b53669756
|
|
BLAKE2b-256 checksum How to use checksums |
1a5a3c91127f84bfe25280fe793f83faa5dda87c767a491f1c53b60af590beba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Security for cals 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.