babel-edtf


Namebabel-edtf JSON
Version 1.1.4 PyPI version JSON
download
home_pagehttps://github.com/inveniosoftware/babel-edtf
SummaryLocalization of Extended Date Time Format level 0 strings.
upload_time2024-03-05 15:51:04
maintainer
docs_urlNone
authorCERN
requires_python
licenseMIT
keywords babel l10n edtf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ..
    Copyright (C) 2020 CERN.

    Babel-EDTF is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.

============
 Babel-EDTF
============

A Python module for localization of Extended Date Time Format (EDTF) level 0
strings.

EDTF is a syntax for specifying imprecise dates. See
http://www.loc.gov/standards/datetime/. This modules relies on
`python-edtf <https://pypi.org/project/edtf/>`_ for
EDTF parsing.

Install
-------

Babel-EDTF is on PyPI so all you need is:

.. code-block:: console

   $ pip install babel-edtf

Quickstart
----------
Let's format some EDTF strings:

>>> from babel_edtf import format_edtf
>>> format_edtf('2020-01', locale='en')
'Jan 2020'

>>> format_edtf('2020-01/2020-09', locale='da')
'jan.–sep. 2020'

>>> format_edtf('2020-01/2020-09', format='long', locale='en')
'January\u2009–\u2009September 2020'

The following formats are supported:

- ``short``
- ``medium``
- ``long``
- ``full``


..
    Copyright (C) 2020 CERN.

    Babel-EDTF is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.

Changes
=======

Version 1.1.4 (released 2024-03-05)

- fix: fail parsing 29th of February on leap years

Version 1.1.3 (released 2023-11-01)

- global: use custom parse_edtf in parse_edtf_level0

Version 1.1.2 (released 2023-10-19)

- add leading zeros for precise month and day

Version 1.1.1 (released 2023-10-19)

- convert isoparse values to string

Version 1.1.0 (released 2023-10-19)

- Add parse_edtf isoparse backed method

Version 1.0.0 (released 2020-11-06)

- Initial public release.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/inveniosoftware/babel-edtf",
    "name": "babel-edtf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "babel l10n edtf",
    "author": "CERN",
    "author_email": "info@inveniosoftware.org",
    "download_url": "https://files.pythonhosted.org/packages/db/e4/0e588f7818a4a5906558145259da89c6b896ee8d1d1e0e6b46913b9e25bb/babel-edtf-1.1.4.tar.gz",
    "platform": "any",
    "description": "..\n    Copyright (C) 2020 CERN.\n\n    Babel-EDTF is free software; you can redistribute it and/or modify it\n    under the terms of the MIT License; see LICENSE file for more details.\n\n============\n Babel-EDTF\n============\n\nA Python module for localization of Extended Date Time Format (EDTF) level 0\nstrings.\n\nEDTF is a syntax for specifying imprecise dates. See\nhttp://www.loc.gov/standards/datetime/. This modules relies on\n`python-edtf <https://pypi.org/project/edtf/>`_ for\nEDTF parsing.\n\nInstall\n-------\n\nBabel-EDTF is on PyPI so all you need is:\n\n.. code-block:: console\n\n   $ pip install babel-edtf\n\nQuickstart\n----------\nLet's format some EDTF strings:\n\n>>> from babel_edtf import format_edtf\n>>> format_edtf('2020-01', locale='en')\n'Jan 2020'\n\n>>> format_edtf('2020-01/2020-09', locale='da')\n'jan.\u2013sep. 2020'\n\n>>> format_edtf('2020-01/2020-09', format='long', locale='en')\n'January\\u2009\u2013\\u2009September 2020'\n\nThe following formats are supported:\n\n- ``short``\n- ``medium``\n- ``long``\n- ``full``\n\n\n..\n    Copyright (C) 2020 CERN.\n\n    Babel-EDTF is free software; you can redistribute it and/or modify it\n    under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.1.4 (released 2024-03-05)\n\n- fix: fail parsing 29th of February on leap years\n\nVersion 1.1.3 (released 2023-11-01)\n\n- global: use custom parse_edtf in parse_edtf_level0\n\nVersion 1.1.2 (released 2023-10-19)\n\n- add leading zeros for precise month and day\n\nVersion 1.1.1 (released 2023-10-19)\n\n- convert isoparse values to string\n\nVersion 1.1.0 (released 2023-10-19)\n\n- Add parse_edtf isoparse backed method\n\nVersion 1.0.0 (released 2020-11-06)\n\n- Initial public release.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Localization of Extended Date Time Format level 0 strings.",
    "version": "1.1.4",
    "project_urls": {
        "Homepage": "https://github.com/inveniosoftware/babel-edtf"
    },
    "split_keywords": [
        "babel",
        "l10n",
        "edtf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b51e3ce8c64c26de8a48662c613529c9bed96b7566c95481d0c418a9d57a8fe9",
                "md5": "806bce54859782f4baab94c3d18043ec",
                "sha256": "93c80d6b5c227f6da5a5b8ae8b8a2f18a60706b18a0dbd00f28a609437db3295"
            },
            "downloads": -1,
            "filename": "babel_edtf-1.1.4-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "806bce54859782f4baab94c3d18043ec",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 6286,
            "upload_time": "2024-03-05T15:51:03",
            "upload_time_iso_8601": "2024-03-05T15:51:03.073651Z",
            "url": "https://files.pythonhosted.org/packages/b5/1e/3ce8c64c26de8a48662c613529c9bed96b7566c95481d0c418a9d57a8fe9/babel_edtf-1.1.4-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbe40e588f7818a4a5906558145259da89c6b896ee8d1d1e0e6b46913b9e25bb",
                "md5": "a8bd6a138de4c4f492f81e0db50eeae3",
                "sha256": "728d6d4b787356cdfcca61980a8b9b41b00edf96cec66fb2ee1035196b9c9643"
            },
            "downloads": -1,
            "filename": "babel-edtf-1.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a8bd6a138de4c4f492f81e0db50eeae3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17640,
            "upload_time": "2024-03-05T15:51:04",
            "upload_time_iso_8601": "2024-03-05T15:51:04.855076Z",
            "url": "https://files.pythonhosted.org/packages/db/e4/0e588f7818a4a5906558145259da89c6b896ee8d1d1e0e6b46913b9e25bb/babel-edtf-1.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-05 15:51:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "inveniosoftware",
    "github_project": "babel-edtf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "babel-edtf"
}
        
Elapsed time: 0.29540s