| Name | temporis JSON |
| Version |
1.0.2
JSON |
| download |
| home_page | None |
| Summary | Temporis is a Python library for elegantly managing and transforming dates and times. It provides intuitive tools for handling temporal data, making time calculations, conversions, and formatting simple and efficient. |
| upload_time | 2024-08-18 16:23:21 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.10 |
| license | MIT |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
<h1 align="center">TEMPORIS</h1>
</p>
<p align="center">
<em>Temporis is a Python library for elegantly managing and transforming <code>dates</code> and <code>times</code>.</em>
</p>
<p align="center">
<img src="https://img.shields.io/github/license/jalvarezgom/temporis?style=default&logo=opensourceinitiative&logoColor=white&color=0080ff" alt="license">
<img src="https://img.shields.io/github/last-commit/jalvarezgom/temporis?style=default&logo=git&logoColor=white&color=0080ff" alt="last-commit">
<img src="https://img.shields.io/github/languages/top/jalvarezgom/temporis?style=default&color=0080ff" alt="repo-top-language">
<img src="https://img.shields.io/pypi/v/temporis.svg?style=default&color=0080ff" alt="repo-top-language">
</p>
-----
## Overview
Temporis is a developer tool created to help with the problem of using and managing dates in Python. Supporting the use and change of the different time uses, operate and modify dates and their formats.
## Features
- Definition and use of different time changes
- Format for formatting dates to different <code>str</code>, <code>datetime</code> or <code>date</code> format
- Performing different types of operations with a <code>datetime</code>
- Add or subtract hours, days, months
- Get the next business day, quarter, semester or year
- Identify if a datetime is a business day, weekend or holiday
- Get the difference between two <code>datetime</code>
## Installation
```console
pip install temporis
```
## Usage
### Create a new datetime object
```python
from datetime import datetime
from temporis.temporis import Temporis
from temporis.format import TemporisFormat
from temporis.timezone import TemporisTz
# Create a new datetime object
dt = datetime(2021, 1, 1, 0, 0, 0)
# Add 5 hours to the datetime
dt = Temporis.add_hours(dt, 5)
# Add 5 days to the datetime
dt = Temporis.add_days(dt, 5)
# Minus 5 months to the datetime
dt = Temporis.add_months(dt, -5)
# Get the next business day
dt = Temporis.next_business_day(dt)
# Get the next quarter
dt = Temporis.next_quarter(dt)
# Apply UTC timezone to the datetime
dt = TemporisTz.to_UTC(dt)
# Print the datetime
print(Temporis.to_str(dt, format_str=TemporisFormat.YEAR_MONTH_DAY))
```
## Repository Structure
```sh
└── temporis/
├── LICENSE
├── pdm.lock
├── pyproject.toml
├── README.md
├── src
│ └── temporis
└── tests
├── __init__.py
├── test_datetime.py
└── test_timezone.py
```
## License
`temporis` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
Raw data
{
"_id": null,
"home_page": null,
"name": "temporis",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Jaime AG <ja.alvarezgom@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/bb/ea/48650d9060b88a5c091d92466ab7f3705b51ee150607ecc3e41005356c8d/temporis-1.0.2.tar.gz",
"platform": null,
"description": " <h1 align=\"center\">TEMPORIS</h1>\n</p>\n<p align=\"center\">\n <em>Temporis is a Python library for elegantly managing and transforming <code>dates</code> and <code>times</code>.</em>\n</p>\n<p align=\"center\">\n\t<img src=\"https://img.shields.io/github/license/jalvarezgom/temporis?style=default&logo=opensourceinitiative&logoColor=white&color=0080ff\" alt=\"license\">\n\t<img src=\"https://img.shields.io/github/last-commit/jalvarezgom/temporis?style=default&logo=git&logoColor=white&color=0080ff\" alt=\"last-commit\">\n\t<img src=\"https://img.shields.io/github/languages/top/jalvarezgom/temporis?style=default&color=0080ff\" alt=\"repo-top-language\">\n <img src=\"https://img.shields.io/pypi/v/temporis.svg?style=default&color=0080ff\" alt=\"repo-top-language\">\n</p>\n\n\n-----\n## Overview\nTemporis is a developer tool created to help with the problem of using and managing dates in Python. Supporting the use and change of the different time uses, operate and modify dates and their formats.\n\n## Features\n- Definition and use of different time changes\n- Format for formatting dates to different <code>str</code>, <code>datetime</code> or <code>date</code> format\n- Performing different types of operations with a <code>datetime</code>\n - Add or subtract hours, days, months\n - Get the next business day, quarter, semester or year\n - Identify if a datetime is a business day, weekend or holiday\n - Get the difference between two <code>datetime</code>\n\n## Installation\n\n```console\npip install temporis\n```\n## Usage\n\n### Create a new datetime object\n```python\nfrom datetime import datetime\nfrom temporis.temporis import Temporis\nfrom temporis.format import TemporisFormat\nfrom temporis.timezone import TemporisTz\n\n\n# Create a new datetime object\ndt = datetime(2021, 1, 1, 0, 0, 0)\n# Add 5 hours to the datetime\ndt = Temporis.add_hours(dt, 5)\n# Add 5 days to the datetime\ndt = Temporis.add_days(dt, 5)\n# Minus 5 months to the datetime\ndt = Temporis.add_months(dt, -5)\n# Get the next business day\ndt = Temporis.next_business_day(dt)\n# Get the next quarter\ndt = Temporis.next_quarter(dt)\n# Apply UTC timezone to the datetime\ndt = TemporisTz.to_UTC(dt)\n# Print the datetime\nprint(Temporis.to_str(dt, format_str=TemporisFormat.YEAR_MONTH_DAY))\n```\n\n## Repository Structure\n\n```sh\n\u2514\u2500\u2500 temporis/\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 pdm.lock\n \u251c\u2500\u2500 pyproject.toml\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 src\n \u2502 \u2514\u2500\u2500 temporis\n \u2514\u2500\u2500 tests\n \u251c\u2500\u2500 __init__.py\n \u251c\u2500\u2500 test_datetime.py\n \u2514\u2500\u2500 test_timezone.py\n```\n\n## License\n\n`temporis` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Temporis is a Python library for elegantly managing and transforming dates and times. It provides intuitive tools for handling temporal data, making time calculations, conversions, and formatting simple and efficient.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/jalvarezgom/temporis",
"Issues": "https://github.com/jalvarezgom/temporis/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f9d37b92c8a057fdf413f8cf82b480378ed44a001d81026d3a9b9531683ab8e8",
"md5": "a4778ae4eb2d0b28b1c69e0fdc8fd67c",
"sha256": "e974d35fff41adf691932182185a0e81fc1830fe943beb8a0d6e0684040a06c7"
},
"downloads": -1,
"filename": "temporis-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a4778ae4eb2d0b28b1c69e0fdc8fd67c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 13109,
"upload_time": "2024-08-18T16:23:19",
"upload_time_iso_8601": "2024-08-18T16:23:19.918539Z",
"url": "https://files.pythonhosted.org/packages/f9/d3/7b92c8a057fdf413f8cf82b480378ed44a001d81026d3a9b9531683ab8e8/temporis-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bbea48650d9060b88a5c091d92466ab7f3705b51ee150607ecc3e41005356c8d",
"md5": "049bb1f0d129b5ca8e75ffcb34e6ea95",
"sha256": "5c2b72c0f98f658b656b0a7459c80c6d9c03e22f5412cb3c57e3142feac7ebf3"
},
"downloads": -1,
"filename": "temporis-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "049bb1f0d129b5ca8e75ffcb34e6ea95",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 13970,
"upload_time": "2024-08-18T16:23:21",
"upload_time_iso_8601": "2024-08-18T16:23:21.588320Z",
"url": "https://files.pythonhosted.org/packages/bb/ea/48650d9060b88a5c091d92466ab7f3705b51ee150607ecc3e41005356c8d/temporis-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-18 16:23:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jalvarezgom",
"github_project": "temporis",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "temporis"
}