pax_global_header00006660000000000000000000000064141273521040014511gustar00rootroot0000000000000052 comment=ce939580f5d116f1ed9b05c0adf6d254ee117fd7 dateparser-1.1.0/000077500000000000000000000000001412735210400136425ustar00rootroot00000000000000dateparser-1.1.0/.coveragerc000066400000000000000000000000321412735210400157560ustar00rootroot00000000000000[run] source = dateparser dateparser-1.1.0/.editorconfig000066400000000000000000000004061412735210400163170ustar00rootroot00000000000000# http://editorconfig.org root = true [*] indent_style = space indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true charset = utf-8 end_of_line = lf [*.bat] indent_style = tab end_of_line = crlf [LICENSE] insert_final_newline = false dateparser-1.1.0/.github/000077500000000000000000000000001412735210400152025ustar00rootroot00000000000000dateparser-1.1.0/.github/workflows/000077500000000000000000000000001412735210400172375ustar00rootroot00000000000000dateparser-1.1.0/.github/workflows/main.yml000066400000000000000000000026311412735210400207100ustar00rootroot00000000000000name: Build on: push: branches: - master pull_request: branches: - master jobs: build: name: Build runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - python-version: 3.8 env: TOXENV: flake8 - python-version: 3.5 env: TOXENV: py - python-version: 3.6 env: TOXENV: py - python-version: 3.7 env: TOXENV: py - python-version: 3.8 env: TOXENV: py - python-version: 3.8 env: TOXENV: latest - python-version: 3.9 env: TOXENV: py - python-version: 3.9 env: TOXENV: latest steps: - uses: actions/checkout@v2 - name: 'Set up Python ${{ matrix.python-version }}' uses: actions/setup-python@v2 with: python-version: '${{ matrix.python-version }}' - name: Install language-pack-fr run: sudo apt-get update && sudo apt-get install language-pack-fr - name: Install python dependencies run: pip install tox - name: tox run: tox -e py - name: Upload coverage.xml to codecov if: ${{ matrix.python-version == '3.9' && matrix.env.TOXENV == 'latest'}} uses: codecov/codecov-action@v1 dateparser-1.1.0/.github/workflows/publish.yml000066400000000000000000000011661412735210400214340ustar00rootroot00000000000000name: Upload Python Package on: release: types: [created] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.x" - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine - name: Build and publish env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: | python setup.py sdist bdist_wheel twine upload dist/* dateparser-1.1.0/.gitignore000066400000000000000000000006721412735210400156370ustar00rootroot00000000000000*.py[cod] # C extensions *.so # Packages *.egg *.eggs *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg lib lib64 # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox nosetests.xml htmlcov coverage.xml # Translations *.mo # Mr Developer .mr.developer.cfg .project .pydevproject # Complexity output/*.html output/*/index.html # Sphinx docs/_build # Editors *.swp .idea # Other raw_data dateparser-1.1.0/AUTHORS.rst000066400000000000000000000013071412735210400155220ustar00rootroot00000000000000======= Credits ======= Currently, more than 100 committers have contributed to this project, making this contributors list really hard to maintain, so we have decided to stop updating this list. To see the people behind this code, you can run ``git shortlog -s -n`` or visit the contributions section in Github: https://github.com/scrapinghub/dateparser/graphs/contributors We really appreciate **all the people that has contributed to this project with their time and ideas**. Special mention to **Waqas Shabir** (waqasshabbir), **Eugene Amirov** (Allactaga) and **Artur Sadurski** (asadurski) for creating and maintaining this awesome project. To all of you... thank you for building and improving this! dateparser-1.1.0/CONTRIBUTING.rst000066400000000000000000000137351412735210400163140ustar00rootroot00000000000000============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com/scrapinghub/dateparser/issues. If you are reporting a bug, please include: * Your operating system name and version. * Any details about your local setup that might be helpful in troubleshooting. * Detailed steps to reproduce the bug. Fix Bugs and Implement Features ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Look through the GitHub issues for bugs and feature requests. To avoid duplicate efforts, try to choose issues without related PRs or with staled PRs. We also encourage you to add new languages to the existing stack. Write Documentation ~~~~~~~~~~~~~~~~~~~ Dateparser could always use more documentation, whether as part of the official Dateparser docs, in docstrings, or even on the web in blog posts, articles, and such. After you make local changes to the documentation, you will be able to build the project running:: tox -e docs Then open ``.tox/docs/tmp/html/index.html`` in a web browser to see your local build of the documentation. .. note:: If you don't have ``tox`` installed, you need to install it first using ``pip install tox``. Submit Feedback ~~~~~~~~~~~~~~~ The best way to send feedback is to file an issue at https://github.com/scrapinghub/dateparser/issues. If you are proposing a feature: * Explain in detail how it would work. * Keep the scope as narrow as possible, to make it easier to implement. * Remember that contributions are welcome :) Get Started! ------------ Ready to contribute? Here's how to set up `dateparser` for local development. 1. Fork the `dateparser` repo on GitHub. 2. Clone your fork locally:: $ git clone git@github.com:your_name_here/dateparser.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: $ mkvirtualenv dateparser $ cd dateparser/ $ python setup.py develop 4. Create a branch for local development:: $ git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: $ tox To get ``tox``, just ``pip install`` it into your virtualenv. In addition to tests, ``tox`` checks for code style and maximum line length (119 characters). 6. Commit your changes and push your branch to GitHub:: $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature 7. Submit a pull request through the GitHub website. Pull Request Guidelines ----------------------- Before you submit a pull request, check that it meets these guidelines: 1. The pull request should include tests. 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in *README.rst*. 3. Check the pipelines (Github Actions) in the PR comments (or in https://github.com/scrapinghub/dateparser/actions) and make sure that the tests pass for all supported Python versions. 4. Check the new project coverage in the PR comments (or in https://app.codecov.io/gh/scrapinghub/dateparser/pulls) and make sure that it remained equal or higher than previously. 5. Follow the core developers' advice which aims to ensure code's consistency regardless of the variety of approaches used by many contributors. 6. In case you are unable to continue working on a PR, please leave a short comment to notify us. We will be pleased to make any changes required to get it done. Guidelines for Editing Translation Data --------------------------------------- English is the primary language of Dateparser. Dates in all other languages are translated into English equivalents before they are parsed. The language data that Dateparser uses to parse dates is in ``dateparser/data/date_translation_data``. For each supported language, there is a Python file containing translation data. Each translation data Python files contains different kinds of translation data for date parsing: month and week names - and their abbreviations, prepositions, conjunctions, frequently used descriptive words and phrases (like “today”), etc. Translation data Python files are generated from the following sources: - `Unicode CLDR `_ data in JSON format, located at ``dateparser_data/cldr_language_data/date_translation_data`` - Additional data from the Dateparser community in YAML format, located at ``dateparser_data/supplementary_language_data/date_translation_data`` If you wish to extend the data of an existing language, or add data for a new language, you must: #. Edit or create the corresponding file within ``dateparser_data/supplementary_language_data/date_translation_data`` See existing files to learn how they are defined, and see :ref:`language-data-template` for details. #. Regenerate the corresponding file within ``dateparser/data/date_translation_data`` running the following script:: dateparser_scripts/write_complete_data.py #. Write tests that cover your changes You should be able to find tests that cover the affected data, and use copy-and-paste to create the corresponding new test. If in doubt, ask Dateparser maintainers for help. .. toctree:: :maxdepth: 2 :hidden: template Updating the List of Supported Languages and Locales ---------------------------------------------------- Whenever the content of ``dateparser.data.languages_info.language_locale_dict`` is modified, use ``dateparser_scripts/update_supported_languages_and_locales.py`` to update the corresponding documentation table:: dateparser_scripts/update_supported_languages_and_locales.py dateparser-1.1.0/HISTORY.rst000066400000000000000000000304621412735210400155420ustar00rootroot00000000000000.. :changelog: History ======= 1.1.0 (2021-10-04) ------------------ New features: * Support language detection based on ``langdetect``, ``fastText``, or a custom implementation (see #932) * Add support for 'by