jaanca-datetime


Namejaanca-datetime JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/jaanca/python-libraries/tree/main/jaanca-datetime
SummaryA tool library created by jaanca with help functions for date and time management and moving dates between time days by UTC.
upload_time2024-07-12 20:17:19
maintainerNone
docs_urlNone
authorJaime Andres Cardona Carrillo
requires_python>=3.8
licenseMIT License
keywords datetime utc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <em>jaanca public libraries</em>
</p>

<p align="center">
<a href="https://pypi.org/project/jaanca-datetime" target="_blank">
    <img src="https://img.shields.io/pypi/v/jaanca-datetime?color=blue&label=PyPI%20Package" alt="Package version">
</a>
<a href="(https://www.python.org" target="_blank">
    <img src="https://img.shields.io/badge/Python-%5B%3E%3D3.8%2C%3C%3D3.11%5D-blue" alt="Python">
</a>
</p>


---

#  A tool library created by jaanca

* **Python library**: A tool library created by jaanca with help functions for date and time management and moving dates between time days by UTC.

[Source code](https://github.com/jaanca/python-libraries/tree/main/jaanca-datetime)
| [Package (PyPI)](https://pypi.org/project/jaanca-datetime/)
| [Samples](https://github.com/jaanca/python-libraries/tree/main/jaanca-datetime/samples)

---

# library installation
```console
pip install jaanca-datetime --upgrade
```

---
# Example of use

```python
from jaanca_datetime import DateTimeHelper, App,TimeZonesPytz

if __name__=="__main__":
    # DateTimeHelper.print_console_timezones_pytz()
    print(f"date now: {DateTimeHelper.get_datetime_now(App.Time.POSTGRESQL_FORMAT_DATE,is_format_string=False)}")
    print(f"date timezone convert UTC to Bogotá: {DateTimeHelper.get_datetime_now_to_another_location(App.Time.STANDARD_FORMAT_DATE,TimeZonesPytz.US.AZURE_DEFAULT,TimeZonesPytz.America.BOGOTA)}")

    datetime_data="2024-08-22 14:02:02"
    datetime_format=App.Time.STANDARD_FORMAT_DATE
    is_valid_format=DateTimeHelper.is_valid_datetime_format(datetime_data,datetime_format)
    print(f"datetime_data[{datetime_format}]:[{datetime_data}]: is_valid_format={is_valid_format}")

    datetime_data="2024-08-22"
    datetime_format="%Y-%m-%d"
    is_valid_format=DateTimeHelper.is_valid_datetime_format(datetime_data,datetime_format)
    print(f"datetime_data[{datetime_format}]:[{datetime_data}]: is_valid_format={is_valid_format}")

    datetime_data="2024-08-22"
    datetime_format=App.Time.STANDARD_FORMAT_DATE
    is_valid_format=DateTimeHelper.is_valid_datetime_format(datetime_data,datetime_format)
    print(f"datetime_data[{datetime_format}]:[{datetime_data}]: is_valid_format={is_valid_format}")

# output
# date now: 2024-07-09 12:31:29.366428
# date timezone convert UTC to Bogotá: 2024-07-09 07:31:29
# datetime_data[%Y-%m-%d %H:%M:%S]:[2024-08-22 14:02:02]: is_valid_format=True
# datetime_data[%Y-%m-%d]:[2024-08-22]: is_valid_format=True
# datetime_data[%Y-%m-%d %H:%M:%S]:[2024-08-22]: is_valid_format=False
 
```

---

# Semantic Versioning

jaanca-datetime < MAJOR >.< MINOR >.< PATCH >

* **MAJOR**: version when you make incompatible API changes
* **MINOR**: version when you add functionality in a backwards compatible manner
* **PATCH**: version when you make backwards compatible bug fixes

## Definitions for releasing versions
* https://peps.python.org/pep-0440/

    - X.YaN (Alpha release): Identify and fix early-stage bugs. Not suitable for production use.
    - X.YbN (Beta release): Stabilize and refine features. Address reported bugs. Prepare for official release.
    - X.YrcN (Release candidate): Final version before official release. Assumes all major features are complete and stable. Recommended for testing in non-critical environments.
    - X.Y (Final release/Stable/Production): Completed, stable version ready for use in production. Full release for public use.
---

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Types of changes

- Added for new features.
- Changed for changes in existing functionality.
- Deprecated for soon-to-be removed features.
- Removed for now removed features.
- Fixed for any bug fixes.
- Security in case of vulnerabilities.

## [0.0.1rcX] - 2024-05-24
### Added
- First tests using pypi.org in develop environment.

## [0.1.0] - 2024-05-24
### Added
- Completion of testing and launch into production.

## [0.1.1] - 2024-05-24
### Added
- Add feature is_valid_datetime_format.

## [0.1.2] - 2024-07-12
### Added
- Add feature get_filename_datetime_hash.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jaanca/python-libraries/tree/main/jaanca-datetime",
    "name": "jaanca-datetime",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "datetime, utc",
    "author": "Jaime Andres Cardona Carrillo",
    "author_email": "jacardona@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/17/89/5be7932a7d02f7b45b81fc0eb75e95c86af90628016d97e7382b365c5e4c/jaanca_datetime-0.1.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\r\n    <em>jaanca public libraries</em>\r\n</p>\r\n\r\n<p align=\"center\">\r\n<a href=\"https://pypi.org/project/jaanca-datetime\" target=\"_blank\">\r\n    <img src=\"https://img.shields.io/pypi/v/jaanca-datetime?color=blue&label=PyPI%20Package\" alt=\"Package version\">\r\n</a>\r\n<a href=\"(https://www.python.org\" target=\"_blank\">\r\n    <img src=\"https://img.shields.io/badge/Python-%5B%3E%3D3.8%2C%3C%3D3.11%5D-blue\" alt=\"Python\">\r\n</a>\r\n</p>\r\n\r\n\r\n---\r\n\r\n#  A tool library created by jaanca\r\n\r\n* **Python library**: A tool library created by jaanca with help functions for date and time management and moving dates between time days by UTC.\r\n\r\n[Source code](https://github.com/jaanca/python-libraries/tree/main/jaanca-datetime)\r\n| [Package (PyPI)](https://pypi.org/project/jaanca-datetime/)\r\n| [Samples](https://github.com/jaanca/python-libraries/tree/main/jaanca-datetime/samples)\r\n\r\n---\r\n\r\n# library installation\r\n```console\r\npip install jaanca-datetime --upgrade\r\n```\r\n\r\n---\r\n# Example of use\r\n\r\n```python\r\nfrom jaanca_datetime import DateTimeHelper, App,TimeZonesPytz\r\n\r\nif __name__==\"__main__\":\r\n    # DateTimeHelper.print_console_timezones_pytz()\r\n    print(f\"date now: {DateTimeHelper.get_datetime_now(App.Time.POSTGRESQL_FORMAT_DATE,is_format_string=False)}\")\r\n    print(f\"date timezone convert UTC to Bogot\u00c3\u00a1: {DateTimeHelper.get_datetime_now_to_another_location(App.Time.STANDARD_FORMAT_DATE,TimeZonesPytz.US.AZURE_DEFAULT,TimeZonesPytz.America.BOGOTA)}\")\r\n\r\n    datetime_data=\"2024-08-22 14:02:02\"\r\n    datetime_format=App.Time.STANDARD_FORMAT_DATE\r\n    is_valid_format=DateTimeHelper.is_valid_datetime_format(datetime_data,datetime_format)\r\n    print(f\"datetime_data[{datetime_format}]:[{datetime_data}]: is_valid_format={is_valid_format}\")\r\n\r\n    datetime_data=\"2024-08-22\"\r\n    datetime_format=\"%Y-%m-%d\"\r\n    is_valid_format=DateTimeHelper.is_valid_datetime_format(datetime_data,datetime_format)\r\n    print(f\"datetime_data[{datetime_format}]:[{datetime_data}]: is_valid_format={is_valid_format}\")\r\n\r\n    datetime_data=\"2024-08-22\"\r\n    datetime_format=App.Time.STANDARD_FORMAT_DATE\r\n    is_valid_format=DateTimeHelper.is_valid_datetime_format(datetime_data,datetime_format)\r\n    print(f\"datetime_data[{datetime_format}]:[{datetime_data}]: is_valid_format={is_valid_format}\")\r\n\r\n# output\r\n# date now: 2024-07-09 12:31:29.366428\r\n# date timezone convert UTC to Bogot\u00c3\u00a1: 2024-07-09 07:31:29\r\n# datetime_data[%Y-%m-%d %H:%M:%S]:[2024-08-22 14:02:02]: is_valid_format=True\r\n# datetime_data[%Y-%m-%d]:[2024-08-22]: is_valid_format=True\r\n# datetime_data[%Y-%m-%d %H:%M:%S]:[2024-08-22]: is_valid_format=False\r\n \r\n```\r\n\r\n---\r\n\r\n# Semantic Versioning\r\n\r\njaanca-datetime < MAJOR >.< MINOR >.< PATCH >\r\n\r\n* **MAJOR**: version when you make incompatible API changes\r\n* **MINOR**: version when you add functionality in a backwards compatible manner\r\n* **PATCH**: version when you make backwards compatible bug fixes\r\n\r\n## Definitions for releasing versions\r\n* https://peps.python.org/pep-0440/\r\n\r\n    - X.YaN (Alpha release): Identify and fix early-stage bugs. Not suitable for production use.\r\n    - X.YbN (Beta release): Stabilize and refine features. Address reported bugs. Prepare for official release.\r\n    - X.YrcN (Release candidate): Final version before official release. Assumes all major features are complete and stable. Recommended for testing in non-critical environments.\r\n    - X.Y (Final release/Stable/Production): Completed, stable version ready for use in production. Full release for public use.\r\n---\r\n\r\n# Changelog\r\n\r\nAll notable changes to this project will be documented in this file.\r\n\r\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\r\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\r\n\r\n## Types of changes\r\n\r\n- Added for new features.\r\n- Changed for changes in existing functionality.\r\n- Deprecated for soon-to-be removed features.\r\n- Removed for now removed features.\r\n- Fixed for any bug fixes.\r\n- Security in case of vulnerabilities.\r\n\r\n## [0.0.1rcX] - 2024-05-24\r\n### Added\r\n- First tests using pypi.org in develop environment.\r\n\r\n## [0.1.0] - 2024-05-24\r\n### Added\r\n- Completion of testing and launch into production.\r\n\r\n## [0.1.1] - 2024-05-24\r\n### Added\r\n- Add feature is_valid_datetime_format.\r\n\r\n## [0.1.2] - 2024-07-12\r\n### Added\r\n- Add feature get_filename_datetime_hash.\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A tool library created by jaanca with help functions for date and time management and moving dates between time days by UTC.",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/jaanca/python-libraries/tree/main/jaanca-datetime"
    },
    "split_keywords": [
        "datetime",
        " utc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fa252f83b5a8977513b2f936f2ca147fe2f372920b264d4cf3359ce22a069c4",
                "md5": "1a8d9853b0d8516ea4acd42b4e53715e",
                "sha256": "23638a23951997ab6641a5a1f8831b486c9b07312d31aad00c2c30523fd78cbe"
            },
            "downloads": -1,
            "filename": "jaanca_datetime-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a8d9853b0d8516ea4acd42b4e53715e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6169,
            "upload_time": "2024-07-12T20:17:18",
            "upload_time_iso_8601": "2024-07-12T20:17:18.043783Z",
            "url": "https://files.pythonhosted.org/packages/5f/a2/52f83b5a8977513b2f936f2ca147fe2f372920b264d4cf3359ce22a069c4/jaanca_datetime-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17895be7932a7d02f7b45b81fc0eb75e95c86af90628016d97e7382b365c5e4c",
                "md5": "d07ebab6ab7bd3cb01d9f2a3d34952f6",
                "sha256": "9fcb0f88c2845431c7c8a3b7f3acf272df9a8f7a6067e4fd5b2054ad611235cc"
            },
            "downloads": -1,
            "filename": "jaanca_datetime-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d07ebab6ab7bd3cb01d9f2a3d34952f6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5796,
            "upload_time": "2024-07-12T20:17:19",
            "upload_time_iso_8601": "2024-07-12T20:17:19.053689Z",
            "url": "https://files.pythonhosted.org/packages/17/89/5be7932a7d02f7b45b81fc0eb75e95c86af90628016d97e7382b365c5e4c/jaanca_datetime-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-12 20:17:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jaanca",
    "github_project": "python-libraries",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jaanca-datetime"
}
        
Elapsed time: 1.60380s