Localization of Extended Date Time Format level 0 strings.
Project description
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 for EDTF parsing.
Install
Babel-EDTF is on PyPI so all you need is:
$ 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 – September 2020'
The following formats are supported:
short
medium
long
full
Changes
Version 1.0.0 (released 2020-11-06)
Initial public release.
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
babel-edtf-1.0.0.tar.gz
(16.5 kB
view hashes)
Built Distribution
Close
Hashes for babel_edtf-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98b9ae95b68ee0a79a9e4988edc6629ffb3f0b606a67cdc081dd9de03652e006 |
|
MD5 | b1ed253c0ff3661c9ffbde2b33d91018 |
|
BLAKE2b-256 | 6ed5670a2938d864c352b3f92cb3c506c1cc4308683525efdae35a55eaafa381 |