├── .coveragerc ├── .editorconfig ├── .git-blame-ignore-revs ├── .github └── workflows │ ├── cifuzz.yml │ ├── main.yml │ └── publish.yml ├── .gitignore ├── .isort.cfg ├── .pre-commit-config.yaml ├── .readthedocs.yml ├── AUTHORS.rst ├── CONTRIBUTING.rst ├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── README.rst ├── artwork ├── dateparser-logo.png └── dateparser.xcf ├── conftest.py ├── dateparser ├── __init__.py ├── calendars │ ├── __init__.py │ ├── hijri.py │ ├── hijri_parser.py │ ├── jalali.py │ └── jalali_parser.py ├── conf.py ├── custom_language_detection │ ├── __init__.py │ ├── fasttext.py │ ├── langdetect.py │ └── language_mapping.py ├── data │ ├── __init__.py │ ├── date_translation_data │ │ ├── __init__.py │ │ ├── af.py │ │ ├── agq.py │ │ ├── ak.py │ │ ├── am.py │ │ ├── ar.py │ │ ├── as.py │ │ ├── asa.py │ │ ├── ast.py │ │ ├── az-Cyrl.py │ │ ├── az-Latn.py │ │ ├── az.py │ │ ├── bas.py │ │ ├── be.py │ │ ├── bem.py │ │ ├── bez.py │ │ ├── bg.py │ │ ├── bm.py │ │ ├── bn.py │ │ ├── bo.py │ │ ├── br.py │ │ ├── brx.py │ │ ├── bs-Cyrl.py │ │ ├── bs-Latn.py │ │ ├── bs.py │ │ ├── ca.py │ │ ├── ce.py │ │ ├── cgg.py │ │ ├── chr.py │ │ ├── ckb.py │ │ ├── cs.py │ │ ├── cy.py │ │ ├── da.py │ │ ├── dav.py │ │ ├── de.py │ │ ├── dje.py │ │ ├── dsb.py │ │ ├── dua.py │ │ ├── dyo.py │ │ ├── dz.py │ │ ├── ebu.py │ │ ├── ee.py │ │ ├── el.py │ │ ├── en.py │ │ ├── eo.py │ │ ├── es.py │ │ ├── et.py │ │ ├── eu.py │ │ ├── ewo.py │ │ ├── fa.py │ │ ├── ff.py │ │ ├── fi.py │ │ ├── fil.py │ │ ├── fo.py │ │ ├── fr.py │ │ ├── fur.py │ │ ├── fy.py │ │ ├── ga.py │ │ ├── gd.py │ │ ├── gl.py │ │ ├── gsw.py │ │ ├── gu.py │ │ ├── guz.py │ │ ├── gv.py │ │ ├── ha.py │ │ ├── haw.py │ │ ├── he.py │ │ ├── hi.py │ │ ├── hr.py │ │ ├── hsb.py │ │ ├── hu.py │ │ ├── hy.py │ │ ├── id.py │ │ ├── ig.py │ │ ├── ii.py │ │ ├── is.py │ │ ├── it.py │ │ ├── ja.py │ │ ├── jgo.py │ │ ├── jmc.py │ │ ├── ka.py │ │ ├── kab.py │ │ ├── kam.py │ │ ├── kde.py │ │ ├── kea.py │ │ ├── khq.py │ │ ├── ki.py │ │ ├── kk.py │ │ ├── kl.py │ │ ├── kln.py │ │ ├── km.py │ │ ├── kn.py │ │ ├── ko.py │ │ ├── kok.py │ │ ├── ks.py │ │ ├── ksb.py │ │ ├── ksf.py │ │ ├── ksh.py │ │ ├── kw.py │ │ ├── ky.py │ │ ├── lag.py │ │ ├── lb.py │ │ ├── lg.py │ │ ├── lkt.py │ │ ├── ln.py │ │ ├── lo.py │ │ ├── lrc.py │ │ ├── lt.py │ │ ├── lu.py │ │ ├── luo.py │ │ ├── luy.py │ │ ├── lv.py │ │ ├── mas.py │ │ ├── mer.py │ │ ├── mfe.py │ │ ├── mg.py │ │ ├── mgh.py │ │ ├── mgo.py │ │ ├── mk.py │ │ ├── ml.py │ │ ├── mn.py │ │ ├── mr.py │ │ ├── ms.py │ │ ├── mt.py │ │ ├── mua.py │ │ ├── my.py │ │ ├── mzn.py │ │ ├── naq.py │ │ ├── nb.py │ │ ├── nd.py │ │ ├── ne.py │ │ ├── nl.py │ │ ├── nmg.py │ │ ├── nn.py │ │ ├── nnh.py │ │ ├── nus.py │ │ ├── nyn.py │ │ ├── om.py │ │ ├── or.py │ │ ├── os.py │ │ ├── pa-Arab.py │ │ ├── pa-Guru.py │ │ ├── pa.py │ │ ├── pl.py │ │ ├── ps.py │ │ ├── pt.py │ │ ├── qu.py │ │ ├── rm.py │ │ ├── rn.py │ │ ├── ro.py │ │ ├── rof.py │ │ ├── ru.py │ │ ├── rw.py │ │ ├── rwk.py │ │ ├── sah.py │ │ ├── saq.py │ │ ├── sbp.py │ │ ├── se.py │ │ ├── seh.py │ │ ├── ses.py │ │ ├── sg.py │ │ ├── shi-Latn.py │ │ ├── shi-Tfng.py │ │ ├── shi.py │ │ ├── si.py │ │ ├── sk.py │ │ ├── sl.py │ │ ├── smn.py │ │ ├── sn.py │ │ ├── so.py │ │ ├── sq.py │ │ ├── sr-Cyrl.py │ │ ├── sr-Latn.py │ │ ├── sr.py │ │ ├── sv.py │ │ ├── sw.py │ │ ├── ta.py │ │ ├── te.py │ │ ├── teo.py │ │ ├── th.py │ │ ├── ti.py │ │ ├── tl.py │ │ ├── to.py │ │ ├── tr.py │ │ ├── twq.py │ │ ├── tzm.py │ │ ├── ug.py │ │ ├── uk.py │ │ ├── ur.py │ │ ├── uz-Arab.py │ │ ├── uz-Cyrl.py │ │ ├── uz-Latn.py │ │ ├── uz.py │ │ ├── vi.py │ │ ├── vun.py │ │ ├── wae.py │ │ ├── xog.py │ │ ├── yav.py │ │ ├── yi.py │ │ ├── yo.py │ │ ├── yue.py │ │ ├── zgh.py │ │ ├── zh-Hans.py │ │ ├── zh-Hant.py │ │ ├── zh.py │ │ └── zu.py │ ├── dateparser_tz_cache.pkl │ └── languages_info.py ├── date.py ├── date_parser.py ├── freshness_date_parser.py ├── languages │ ├── __init__.py │ ├── dictionary.py │ ├── loader.py │ ├── locale.py │ └── validation.py ├── parser.py ├── search │ ├── __init__.py │ ├── detection.py │ ├── search.py │ └── text_detection.py ├── timezone_parser.py ├── timezones.py └── utils │ ├── __init__.py │ └── strptime.py ├── dateparser_cli ├── __init__.py ├── cli.py ├── exceptions.py ├── fasttext_manager.py └── utils.py ├── dateparser_data ├── __init__.py ├── cldr_language_data │ └── date_translation_data │ │ ├── af.json │ │ ├── agq.json │ │ ├── ak.json │ │ ├── am.json │ │ ├── ar.json │ │ ├── as.json │ │ ├── asa.json │ │ ├── ast.json │ │ ├── az-Cyrl.json │ │ ├── az-Latn.json │ │ ├── az.json │ │ ├── bas.json │ │ ├── be.json │ │ ├── bem.json │ │ ├── bez.json │ │ ├── bg.json │ │ ├── bm.json │ │ ├── bn.json │ │ ├── bo.json │ │ ├── br.json │ │ ├── brx.json │ │ ├── bs-Cyrl.json │ │ ├── bs-Latn.json │ │ ├── bs.json │ │ ├── ca.json │ │ ├── ce.json │ │ ├── cgg.json │ │ ├── chr.json │ │ ├── ckb.json │ │ ├── cs.json │ │ ├── cy.json │ │ ├── da.json │ │ ├── dav.json │ │ ├── de.json │ │ ├── dje.json │ │ ├── dsb.json │ │ ├── dua.json │ │ ├── dyo.json │ │ ├── dz.json │ │ ├── ebu.json │ │ ├── ee.json │ │ ├── el.json │ │ ├── en.json │ │ ├── eo.json │ │ ├── es.json │ │ ├── et.json │ │ ├── eu.json │ │ ├── ewo.json │ │ ├── fa.json │ │ ├── ff.json │ │ ├── fi.json │ │ ├── fil.json │ │ ├── fo.json │ │ ├── fr.json │ │ ├── fur.json │ │ ├── fy.json │ │ ├── ga.json │ │ ├── gd.json │ │ ├── gl.json │ │ ├── gsw.json │ │ ├── gu.json │ │ ├── guz.json │ │ ├── gv.json │ │ ├── ha.json │ │ ├── haw.json │ │ ├── he.json │ │ ├── hi.json │ │ ├── hr.json │ │ ├── hsb.json │ │ ├── hu.json │ │ ├── hy.json │ │ ├── id.json │ │ ├── ig.json │ │ ├── ii.json │ │ ├── is.json │ │ ├── it.json │ │ ├── ja.json │ │ ├── jgo.json │ │ ├── jmc.json │ │ ├── ka.json │ │ ├── kab.json │ │ ├── kam.json │ │ ├── kde.json │ │ ├── kea.json │ │ ├── khq.json │ │ ├── ki.json │ │ ├── kk.json │ │ ├── kl.json │ │ ├── kln.json │ │ ├── km.json │ │ ├── kn.json │ │ ├── ko.json │ │ ├── kok.json │ │ ├── ks.json │ │ ├── ksb.json │ │ ├── ksf.json │ │ ├── ksh.json │ │ ├── kw.json │ │ ├── ky.json │ │ ├── lag.json │ │ ├── lb.json │ │ ├── lg.json │ │ ├── lkt.json │ │ ├── ln.json │ │ ├── lo.json │ │ ├── lrc.json │ │ ├── lt.json │ │ ├── lu.json │ │ ├── luo.json │ │ ├── luy.json │ │ ├── lv.json │ │ ├── mas.json │ │ ├── mer.json │ │ ├── mfe.json │ │ ├── mg.json │ │ ├── mgh.json │ │ ├── mgo.json │ │ ├── mk.json │ │ ├── ml.json │ │ ├── mn.json │ │ ├── mr.json │ │ ├── ms.json │ │ ├── mt.json │ │ ├── mua.json │ │ ├── my.json │ │ ├── mzn.json │ │ ├── naq.json │ │ ├── nb.json │ │ ├── nd.json │ │ ├── ne.json │ │ ├── nl.json │ │ ├── nmg.json │ │ ├── nn.json │ │ ├── nnh.json │ │ ├── nus.json │ │ ├── nyn.json │ │ ├── om.json │ │ ├── or.json │ │ ├── os.json │ │ ├── pa-Arab.json │ │ ├── pa-Guru.json │ │ ├── pa.json │ │ ├── pl.json │ │ ├── ps.json │ │ ├── pt.json │ │ ├── qu.json │ │ ├── rm.json │ │ ├── rn.json │ │ ├── ro.json │ │ ├── rof.json │ │ ├── ru.json │ │ ├── rw.json │ │ ├── rwk.json │ │ ├── sah.json │ │ ├── saq.json │ │ ├── sbp.json │ │ ├── se.json │ │ ├── seh.json │ │ ├── ses.json │ │ ├── sg.json │ │ ├── shi-Latn.json │ │ ├── shi-Tfng.json │ │ ├── shi.json │ │ ├── si.json │ │ ├── sk.json │ │ ├── sl.json │ │ ├── smn.json │ │ ├── sn.json │ │ ├── so.json │ │ ├── sq.json │ │ ├── sr-Cyrl.json │ │ ├── sr-Latn.json │ │ ├── sr.json │ │ ├── sv.json │ │ ├── sw.json │ │ ├── ta.json │ │ ├── te.json │ │ ├── teo.json │ │ ├── th.json │ │ ├── ti.json │ │ ├── to.json │ │ ├── tr.json │ │ ├── twq.json │ │ ├── tzm.json │ │ ├── ug.json │ │ ├── uk.json │ │ ├── ur.json │ │ ├── uz-Arab.json │ │ ├── uz-Cyrl.json │ │ ├── uz-Latn.json │ │ ├── uz.json │ │ ├── vi.json │ │ ├── vun.json │ │ ├── wae.json │ │ ├── xog.json │ │ ├── yav.json │ │ ├── yi.json │ │ ├── yo.json │ │ ├── yue.json │ │ ├── zgh.json │ │ ├── zh-Hans.json │ │ ├── zh-Hant.json │ │ ├── zh.json │ │ └── zu.json ├── settings.py └── supplementary_language_data │ ├── base_data.yaml │ └── date_translation_data │ ├── ar.yaml │ ├── be.yaml │ ├── bg.yaml │ ├── bn.yaml │ ├── ca.yaml │ ├── cs.yaml │ ├── da.yaml │ ├── de.yaml │ ├── en.yaml │ ├── es.yaml │ ├── fa.yaml │ ├── fi.yaml │ ├── fr.yaml │ ├── he.yaml │ ├── hi.yaml │ ├── hr.yaml │ ├── hu.yaml │ ├── id.yaml │ ├── it.yaml │ ├── ja.yaml │ ├── ka.yaml │ ├── nb.yaml │ ├── nl.yaml │ ├── pl.yaml │ ├── pt.yaml │ ├── ro.yaml │ ├── ru.yaml │ ├── sk.yaml │ ├── sv.yaml │ ├── th.yaml │ ├── tl.yaml │ ├── tr.yaml │ ├── uk.yaml │ ├── vi.yaml │ ├── yue.yaml │ ├── zh-Hans.yaml │ ├── zh-Hant.yaml │ └── zh.yaml ├── dateparser_scripts ├── __init__.py ├── get_cldr_data.py ├── order_languages.py ├── requirements.txt ├── update_supported_languages_and_locales.py ├── utils.py └── write_complete_data.py ├── docs ├── Makefile ├── authors.rst ├── conf.py ├── contributing.rst ├── custom_language_detection.rst ├── dateparser.calendars.rst ├── dateparser.languages.rst ├── dateparser.rst ├── history.rst ├── index.rst ├── installation.rst ├── introduction.rst ├── make.bat ├── modules.rst ├── requirements.txt ├── settings.rst ├── supported_locales.rst ├── template.rst └── usage.rst ├── fuzzing ├── build.sh ├── corpus │ ├── current │ ├── date_time │ ├── french │ ├── minutes_offset │ ├── russian │ ├── thai │ ├── time │ ├── time_offset │ └── turkish ├── dateparser_fuzzer.py └── fuzz_helpers.py ├── pyproject.toml ├── pytest.ini ├── setup.py ├── tests ├── __init__.py ├── test_clean_api.py ├── test_data.py ├── test_date.py ├── test_date_data.py ├── test_date_parser.py ├── test_dateparser_data_integrity.py ├── test_freshness_date_parser.py ├── test_hijri.py ├── test_jalali.py ├── test_language_detect.py ├── test_languages.py ├── test_loading.py ├── test_parser.py ├── test_pickle.py ├── test_search.py ├── test_settings.py ├── test_timezone_parser.py ├── test_utils.py └── test_utils_strptime.py └── tox.ini /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | source = dateparser 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [*.bat] 14 | indent_style = tab 15 | end_of_line = crlf 16 | 17 | [LICENSE] 18 | insert_final_newline = false 19 | 20 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Apply the auto-formatter black 2 | 24c1637dcc77aac006db8ebcfbf5199fa7abac5d 3 | -------------------------------------------------------------------------------- /.github/workflows/cifuzz.yml: -------------------------------------------------------------------------------- 1 | name: CIFuzz 2 | on: [pull_request] 3 | permissions: {} 4 | jobs: 5 | Fuzzing: 6 | runs-on: ubuntu-latest 7 | permissions: 8 | security-events: write 9 | steps: 10 | - name: Build Fuzzers 11 | id: build 12 | uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master 13 | with: 14 | oss-fuzz-project-name: 'dateparser' 15 | language: python 16 | - name: Run Fuzzers 17 | uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master 18 | with: 19 | oss-fuzz-project-name: 'dateparser' 20 | language: python 21 | fuzz-seconds: 600 22 | output-sarif: true 23 | - name: Upload Crash 24 | uses: actions/upload-artifact@v4 25 | if: failure() && steps.build.outcome == 'success' 26 | with: 27 | name: artifacts 28 | path: ./out/artifacts 29 | - name: Upload Sarif 30 | if: always() && steps.build.outcome == 'success' 31 | uses: github/codeql-action/upload-sarif@v2 32 | with: 33 | # Path to SARIF file relative to the root of the repository 34 | sarif_file: cifuzz-sarif/results.sarif 35 | checkout_path: cifuzz-sarif 36 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | branches: 8 | - master 9 | jobs: 10 | build: 11 | name: Build 12 | runs-on: ubuntu-latest 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | include: 17 | - python-version: "3.13" 18 | toxenv: pre-commit 19 | - python-version: "3.9" 20 | toxenv: min 21 | - python-version: "3.9" 22 | toxenv: min-all 23 | - python-version: "3.9" 24 | - python-version: "3.10" 25 | - python-version: "3.11" 26 | - python-version: "3.12" 27 | - python-version: "3.13" 28 | toxenv: all 29 | - python-version: "3.13" 30 | toxenv: scripts 31 | - python-version: "3.12" # Keep in sync with tox.ini 32 | toxenv: docs 33 | - python-version: "3.13" 34 | toxenv: twinecheck 35 | steps: 36 | - uses: actions/checkout@v3 37 | - name: 'Set up Python ${{ matrix.python-version }}' 38 | uses: actions/setup-python@v5 39 | with: 40 | python-version: ${{ matrix.python-version }} 41 | - name: Install language-pack-fr 42 | run: sudo apt-get update && sudo apt-get install -y language-pack-fr build-essential 43 | - name: Install dependencies 44 | run: | 45 | python -m pip install --upgrade pip 46 | pip install tox 47 | - name: Run tests 48 | run: tox -e ${{ matrix.toxenv || 'py' }} 49 | - name: Upload coverage.xml to codecov 50 | uses: codecov/codecov-action@v5 51 | with: 52 | token: ${{ secrets.CODECOV_TOKEN }} 53 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Upload Python Package 2 | 3 | on: 4 | release: 5 | types: [created] 6 | 7 | jobs: 8 | deploy: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v3 13 | - name: Set up Python 14 | uses: actions/setup-python@v5 15 | with: 16 | python-version: "3.x" 17 | - name: Install dependencies 18 | run: | 19 | python -m pip install --upgrade pip 20 | pip install setuptools wheel twine 21 | - name: Build and publish 22 | env: 23 | TWINE_USERNAME: __token__ 24 | TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} 25 | run: | 26 | python setup.py sdist bdist_wheel 27 | twine upload dist/* 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | .python-version 3 | 4 | # C extensions 5 | *.so 6 | 7 | # Packages 8 | *.egg 9 | *.eggs 10 | *.egg-info 11 | dist 12 | build 13 | eggs 14 | parts 15 | bin 16 | var 17 | sdist 18 | develop-eggs 19 | .installed.cfg 20 | lib 21 | lib64 22 | 23 | # Installer logs 24 | pip-log.txt 25 | 26 | # Unit test / coverage reports 27 | .coverage 28 | .tox 29 | nosetests.xml 30 | htmlcov 31 | coverage.xml 32 | 33 | # Translations 34 | *.mo 35 | 36 | # Mr Developer 37 | .mr.developer.cfg 38 | .project 39 | .pydevproject 40 | 41 | # Complexity 42 | output/*.html 43 | output/*/index.html 44 | 45 | # Sphinx 46 | docs/_build 47 | 48 | # Editors 49 | *.swp 50 | .idea 51 | .vscode/ 52 | 53 | # Other 54 | raw_data 55 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | profile = black 3 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/astral-sh/ruff-pre-commit 3 | rev: v0.9.3 4 | hooks: 5 | - id: ruff 6 | args: [ --fix ] 7 | - id: ruff-format 8 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | formats: all 3 | sphinx: 4 | configuration: docs/conf.py 5 | fail_on_warning: true 6 | 7 | build: 8 | os: ubuntu-20.04 9 | tools: 10 | # For available versions, see: 11 | # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python 12 | python: "3.11" # Keep in sync with .github/workflows/checks.yml 13 | 14 | python: 15 | install: 16 | - requirements: docs/requirements.txt 17 | - path: . 18 | -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Credits 3 | ======= 4 | 5 | Currently, more than 100 committers have contributed to this project, making this 6 | contributors list really hard to maintain, so we have decided to stop updating 7 | this list. 8 | 9 | To see the people behind this code, you can run ``git shortlog -s -n`` or visit the 10 | contributions section in Github: https://github.com/scrapinghub/dateparser/graphs/contributors 11 | 12 | We really appreciate **all the people that has contributed to this project with their 13 | time and ideas**. Special mention to **Waqas Shabir** (waqasshabbir), **Eugene Amirov** 14 | (Allactaga) and **Artur Sadurski** (asadurski) for creating and maintaining this awesome 15 | project. 16 | 17 | To all of you... thank you for building and improving this! 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Scrapinghub 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 10 | * Neither the name of DateParser nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS.rst 2 | include CONTRIBUTING.rst 3 | include HISTORY.rst 4 | include LICENSE 5 | include README.rst 6 | include dateparser/data/dateparser_tz_cache.pkl 7 | include dateparser_data/settings.py 8 | include requirements.txt 9 | 10 | recursive-include tests * 11 | recursive-exclude * __pycache__ 12 | recursive-exclude * *.py[co] 13 | 14 | recursive-include docs *.rst conf.py Makefile make.bat 15 | -------------------------------------------------------------------------------- /artwork/dateparser-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/artwork/dateparser-logo.png -------------------------------------------------------------------------------- /artwork/dateparser.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/artwork/dateparser.xcf -------------------------------------------------------------------------------- /conftest.py: -------------------------------------------------------------------------------- 1 | def pytest_collection_modifyitems(session, config, items): 2 | # Avoid executing tests when executing `--flake8` flag (pytest-flake8) 3 | try: 4 | from pytest_flake8 import Flake8Item 5 | 6 | if config.getoption("--flake8"): 7 | items[:] = [item for item in items if isinstance(item, Flake8Item)] 8 | except ImportError: 9 | pass 10 | -------------------------------------------------------------------------------- /dateparser/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "1.2.1" 2 | 3 | from .conf import apply_settings 4 | from .date import DateDataParser 5 | 6 | _default_parser = DateDataParser() 7 | 8 | 9 | @apply_settings 10 | def parse( 11 | date_string, 12 | date_formats=None, 13 | languages=None, 14 | locales=None, 15 | region=None, 16 | settings=None, 17 | detect_languages_function=None, 18 | ): 19 | """Parse date and time from given date string. 20 | 21 | :param date_string: 22 | A string representing date and/or time in a recognizably valid format. 23 | :type date_string: str 24 | 25 | :param date_formats: 26 | A list of format strings using directives as given 27 | `here `_. 28 | The parser applies formats one by one, taking into account the detected languages/locales. 29 | :type date_formats: list 30 | 31 | :param languages: 32 | A list of language codes, e.g. ['en', 'es', 'zh-Hant']. 33 | If locales are not given, languages and region are used to construct locales for translation. 34 | :type languages: list 35 | 36 | :param locales: 37 | A list of locale codes, e.g. ['fr-PF', 'qu-EC', 'af-NA']. 38 | The parser uses only these locales to translate date string. 39 | :type locales: list 40 | 41 | :param region: 42 | A region code, e.g. 'IN', '001', 'NE'. 43 | If locales are not given, languages and region are used to construct locales for translation. 44 | :type region: str 45 | 46 | :param settings: 47 | Configure customized behavior using settings defined in :mod:`dateparser.conf.Settings`. 48 | :type settings: dict 49 | 50 | :param detect_languages_function: 51 | A function for language detection that takes as input a string (the `date_string`) and 52 | a `confidence_threshold`, and returns a list of detected language codes. 53 | Note: this function is only used if ``languages`` and ``locales`` are not provided. 54 | :type detect_languages_function: function 55 | 56 | :return: Returns :class:`datetime ` representing parsed date if successful, else returns None 57 | :rtype: :class:`datetime `. 58 | :raises: 59 | ``ValueError``: Unknown Language, ``TypeError``: Languages argument must be a list, 60 | ``SettingValidationError``: A provided setting is not valid. 61 | """ 62 | parser = _default_parser 63 | 64 | if ( 65 | languages 66 | or locales 67 | or region 68 | or detect_languages_function 69 | or not settings._default 70 | ): 71 | parser = DateDataParser( 72 | languages=languages, 73 | locales=locales, 74 | region=region, 75 | settings=settings, 76 | detect_languages_function=detect_languages_function, 77 | ) 78 | 79 | data = parser.get_date_data(date_string, date_formats) 80 | 81 | if data: 82 | return data["date_obj"] 83 | -------------------------------------------------------------------------------- /dateparser/calendars/hijri.py: -------------------------------------------------------------------------------- 1 | from dateparser.calendars import CalendarBase 2 | from dateparser.calendars.hijri_parser import hijri_parser 3 | 4 | 5 | class HijriCalendar(CalendarBase): 6 | parser = hijri_parser 7 | -------------------------------------------------------------------------------- /dateparser/calendars/hijri_parser.py: -------------------------------------------------------------------------------- 1 | from hijridate import Gregorian, Hijri 2 | 3 | from dateparser.calendars import non_gregorian_parser 4 | 5 | 6 | class hijri: 7 | @classmethod 8 | def to_gregorian(cls, year=None, month=None, day=None): 9 | g = Hijri(year=year, month=month, day=day, validate=False).to_gregorian() 10 | return g.datetuple() 11 | 12 | @classmethod 13 | def from_gregorian(cls, year=None, month=None, day=None): 14 | h = Gregorian(year, month, day).to_hijri() 15 | return h.datetuple() 16 | 17 | @classmethod 18 | def month_length(cls, year, month): 19 | h = Hijri(year=year, month=month, day=1) 20 | return h.month_length() 21 | 22 | 23 | class HijriDate: 24 | def __init__(self, year, month, day): 25 | self.year = year 26 | self.month = month 27 | self.day = day 28 | 29 | def weekday(self): 30 | for week in hijri.monthcalendar(self.year, self.month): 31 | for idx, day in enumerate(week): 32 | if day == self.day: 33 | return idx 34 | 35 | 36 | class hijri_parser(non_gregorian_parser): 37 | calendar_converter = hijri 38 | default_year = 1389 39 | default_month = 1 40 | default_day = 1 41 | non_gregorian_date_cls = HijriDate 42 | 43 | _time_conventions = { 44 | "am": ["صباحاً"], 45 | "pm": ["مساءً"], 46 | } 47 | 48 | @classmethod 49 | def _replace_time_conventions(cls, source): 50 | result = source 51 | for latin, arabics in cls._time_conventions.items(): 52 | for arabic in arabics: 53 | result = result.replace(arabic, latin) 54 | return result 55 | 56 | def handle_two_digit_year(self, year): 57 | if year >= 90: 58 | return year + 1300 59 | else: 60 | return year + 1400 61 | -------------------------------------------------------------------------------- /dateparser/calendars/jalali.py: -------------------------------------------------------------------------------- 1 | from dateparser.calendars.jalali_parser import jalali_parser 2 | 3 | from . import CalendarBase 4 | 5 | 6 | class JalaliCalendar(CalendarBase): 7 | """Calendar class for Jalali calendar.""" 8 | 9 | parser = jalali_parser 10 | -------------------------------------------------------------------------------- /dateparser/custom_language_detection/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/dateparser/custom_language_detection/__init__.py -------------------------------------------------------------------------------- /dateparser/custom_language_detection/fasttext.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import fasttext 4 | 5 | from dateparser_cli.exceptions import FastTextModelNotFoundException 6 | from dateparser_cli.fasttext_manager import fasttext_downloader 7 | from dateparser_cli.utils import create_data_model_home, dateparser_model_home 8 | 9 | _supported_models = ["large.bin", "small.bin"] 10 | _DEFAULT_MODEL = "small" 11 | 12 | 13 | class _FastTextCache: 14 | model = None 15 | 16 | 17 | def _load_fasttext_model(): 18 | if _FastTextCache.model: 19 | return _FastTextCache.model 20 | create_data_model_home() 21 | downloaded_models = [ 22 | file for file in os.listdir(dateparser_model_home) if file in _supported_models 23 | ] 24 | if not downloaded_models: 25 | fasttext_downloader(_DEFAULT_MODEL) 26 | return _load_fasttext_model() 27 | model_path = os.path.join(dateparser_model_home, downloaded_models[0]) 28 | if not os.path.isfile(model_path): 29 | raise FastTextModelNotFoundException("Fasttext model file not found") 30 | _FastTextCache.model = fasttext.load_model(model_path) 31 | return _FastTextCache.model 32 | 33 | 34 | def detect_languages(text, confidence_threshold): 35 | _language_parser = _load_fasttext_model() 36 | text = text.replace("\n", " ").replace("\r", "") 37 | language_codes = [] 38 | parser_data = _language_parser.predict(text) 39 | for idx, language_probability in enumerate(parser_data[1]): 40 | if language_probability > confidence_threshold: 41 | language_code = parser_data[0][idx].replace("__label__", "") 42 | language_codes.append(language_code) 43 | return language_codes 44 | -------------------------------------------------------------------------------- /dateparser/custom_language_detection/langdetect.py: -------------------------------------------------------------------------------- 1 | import langdetect 2 | 3 | # The below _Factory is set to prevent setting global state of the library 4 | # but still get consistent results. 5 | # Refer : https://github.com/Mimino666/langdetect 6 | 7 | 8 | class _Factory: 9 | data = None 10 | 11 | 12 | def _init_factory(): 13 | if _Factory.data is None: 14 | _Factory.data = langdetect.detector_factory.DetectorFactory() 15 | _Factory.data.load_profile(langdetect.detector_factory.PROFILES_DIRECTORY) 16 | _Factory.data.seed = 0 17 | 18 | 19 | def _get_language_probablities(text): 20 | _init_factory() 21 | detector = _Factory.data.create() 22 | detector.append(text) 23 | return detector.get_probabilities() 24 | 25 | 26 | def detect_languages(text, confidence_threshold): 27 | language_codes = [] 28 | try: 29 | parser_data = _get_language_probablities(text) 30 | for language_candidate in parser_data: 31 | if language_candidate.prob > confidence_threshold: 32 | language_codes.append(language_candidate.lang) 33 | except langdetect.lang_detect_exception.LangDetectException: 34 | # This exception can be produced with empty strings or inputs without letters like `10-10-2021`. 35 | # As this could be really common, we ignore them. 36 | pass 37 | return language_codes 38 | -------------------------------------------------------------------------------- /dateparser/custom_language_detection/language_mapping.py: -------------------------------------------------------------------------------- 1 | from dateparser.data.languages_info import language_map 2 | 3 | 4 | def map_languages(language_codes): 5 | """ 6 | Returns the candidates from the supported languages codes. 7 | :param language_codes: 8 | A list of language codes, e.g. ['en', 'es'] in ISO 639 Standard. 9 | :type language_codes: list 10 | :return: Returns list[str] representing supported languages 11 | :rtype: list[str] 12 | """ 13 | return [ 14 | language_code 15 | for language in language_codes 16 | if language in language_map 17 | for language_code in language_map[language] 18 | ] 19 | -------------------------------------------------------------------------------- /dateparser/data/__init__.py: -------------------------------------------------------------------------------- 1 | from dateparser.data import date_translation_data 2 | from .languages_info import language_order, language_locale_dict 3 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/dateparser/data/date_translation_data/__init__.py -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/ckb.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "name": "ckb", 3 | "date_order": "YMD", 4 | "january": [ 5 | "کانوونی دووەم" 6 | ], 7 | "february": [ 8 | "شوبات" 9 | ], 10 | "march": [ 11 | "ئازار" 12 | ], 13 | "april": [ 14 | "نیسان" 15 | ], 16 | "may": [ 17 | "ئایار" 18 | ], 19 | "june": [ 20 | "حوزەیران" 21 | ], 22 | "july": [ 23 | "تەمووز" 24 | ], 25 | "august": [ 26 | "ئاب" 27 | ], 28 | "september": [ 29 | "ئەیلوول" 30 | ], 31 | "october": [ 32 | "تشرینی یەکەم" 33 | ], 34 | "november": [ 35 | "تشرینی دووەم" 36 | ], 37 | "december": [ 38 | "کانونی یەکەم" 39 | ], 40 | "monday": [ 41 | "دووشەممە" 42 | ], 43 | "tuesday": [ 44 | "سێشەممە" 45 | ], 46 | "wednesday": [ 47 | "چوارشەممە" 48 | ], 49 | "thursday": [ 50 | "پێنجشەممە" 51 | ], 52 | "friday": [ 53 | "ھەینی" 54 | ], 55 | "saturday": [ 56 | "شەممە" 57 | ], 58 | "sunday": [ 59 | "یەکشەممە" 60 | ], 61 | "am": [ 62 | "بن" 63 | ], 64 | "pm": [ 65 | "دن" 66 | ], 67 | "year": [ 68 | "year" 69 | ], 70 | "month": [ 71 | "month" 72 | ], 73 | "week": [ 74 | "week" 75 | ], 76 | "day": [ 77 | "day" 78 | ], 79 | "hour": [ 80 | "hour" 81 | ], 82 | "minute": [ 83 | "minute" 84 | ], 85 | "second": [ 86 | "second" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "today" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "yesterday" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "tomorrow" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": { 136 | "ckb-IR": { 137 | "name": "ckb-IR" 138 | } 139 | }, 140 | "skip": [ 141 | " ", 142 | "'", 143 | ",", 144 | "-", 145 | ".", 146 | "/", 147 | ";", 148 | "@", 149 | "[", 150 | "]", 151 | "|", 152 | "," 153 | ] 154 | } 155 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/ii.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "name": "ii", 3 | "date_order": "YMD", 4 | "january": [ 5 | "ꋍꆪ" 6 | ], 7 | "february": [ 8 | "ꑍꆪ" 9 | ], 10 | "march": [ 11 | "ꌕꆪ" 12 | ], 13 | "april": [ 14 | "ꇖꆪ" 15 | ], 16 | "may": [ 17 | "ꉬꆪ" 18 | ], 19 | "june": [ 20 | "ꃘꆪ" 21 | ], 22 | "july": [ 23 | "ꏃꆪ" 24 | ], 25 | "august": [ 26 | "ꉆꆪ" 27 | ], 28 | "september": [ 29 | "ꈬꆪ" 30 | ], 31 | "october": [ 32 | "ꊰꆪ" 33 | ], 34 | "november": [ 35 | "ꊰꊪꆪ" 36 | ], 37 | "december": [ 38 | "ꊰꑋꆪ" 39 | ], 40 | "monday": [ 41 | "ꆏꊂꋍ", 42 | "ꆏꋍ" 43 | ], 44 | "tuesday": [ 45 | "ꆏꊂꑍ", 46 | "ꆏꑍ" 47 | ], 48 | "wednesday": [ 49 | "ꆏꊂꌕ", 50 | "ꆏꌕ" 51 | ], 52 | "thursday": [ 53 | "ꆏꇖ", 54 | "ꆏꊂꇖ" 55 | ], 56 | "friday": [ 57 | "ꆏꉬ", 58 | "ꆏꊂꉬ" 59 | ], 60 | "saturday": [ 61 | "ꆏꃘ", 62 | "ꆏꊂꃘ" 63 | ], 64 | "sunday": [ 65 | "ꑭꆏ", 66 | "ꑭꆏꑍ" 67 | ], 68 | "am": [ 69 | "ꎸꄑ" 70 | ], 71 | "pm": [ 72 | "ꁯꋒ" 73 | ], 74 | "year": [ 75 | "ꈎ" 76 | ], 77 | "month": [ 78 | "ꆪ" 79 | ], 80 | "week": [ 81 | "ꑭꆏ" 82 | ], 83 | "day": [ 84 | "ꑍ" 85 | ], 86 | "hour": [ 87 | "ꄮꈉ" 88 | ], 89 | "minute": [ 90 | "ꃏ" 91 | ], 92 | "second": [ 93 | "ꇙ" 94 | ], 95 | "relative-type": { 96 | "0 day ago": [ 97 | "ꀃꑍ" 98 | ], 99 | "0 hour ago": [ 100 | "this hour" 101 | ], 102 | "0 minute ago": [ 103 | "this minute" 104 | ], 105 | "0 month ago": [ 106 | "this month" 107 | ], 108 | "0 second ago": [ 109 | "now" 110 | ], 111 | "0 week ago": [ 112 | "this week" 113 | ], 114 | "0 year ago": [ 115 | "this year" 116 | ], 117 | "1 day ago": [ 118 | "ꀋꅔꉈ" 119 | ], 120 | "1 month ago": [ 121 | "last month" 122 | ], 123 | "1 week ago": [ 124 | "last week" 125 | ], 126 | "1 year ago": [ 127 | "last year" 128 | ], 129 | "in 1 day": [ 130 | "ꃆꏂꑍ" 131 | ], 132 | "in 1 month": [ 133 | "next month" 134 | ], 135 | "in 1 week": [ 136 | "next week" 137 | ], 138 | "in 1 year": [ 139 | "next year" 140 | ] 141 | }, 142 | "locale_specific": {}, 143 | "skip": [ 144 | " ", 145 | "'", 146 | ",", 147 | "-", 148 | ".", 149 | "/", 150 | ";", 151 | "@", 152 | "[", 153 | "]", 154 | "|", 155 | "," 156 | ] 157 | } 158 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/ks.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "name": "ks", 3 | "date_order": "MDY", 4 | "january": [ 5 | "جنؤری" 6 | ], 7 | "february": [ 8 | "فرؤری" 9 | ], 10 | "march": [ 11 | "مارٕچ" 12 | ], 13 | "april": [ 14 | "اپریل" 15 | ], 16 | "may": [ 17 | "میٔ" 18 | ], 19 | "june": [ 20 | "جوٗن" 21 | ], 22 | "july": [ 23 | "جوٗلایی" 24 | ], 25 | "august": [ 26 | "اگست" 27 | ], 28 | "september": [ 29 | "ستمبر" 30 | ], 31 | "october": [ 32 | "اکتوٗبر" 33 | ], 34 | "november": [ 35 | "نومبر" 36 | ], 37 | "december": [ 38 | "دسمبر" 39 | ], 40 | "monday": [ 41 | "ژٔنٛدرٕروار", 42 | "ژٔنٛدٕروار" 43 | ], 44 | "tuesday": [ 45 | "بوٚموار" 46 | ], 47 | "wednesday": [ 48 | "بودوار" 49 | ], 50 | "thursday": [ 51 | "برٛٮ۪سوار" 52 | ], 53 | "friday": [ 54 | "جُمہ" 55 | ], 56 | "saturday": [ 57 | "بٹوار" 58 | ], 59 | "sunday": [ 60 | "آتھوار", 61 | "اَتھوار" 62 | ], 63 | "am": [ 64 | "am" 65 | ], 66 | "pm": [ 67 | "pm" 68 | ], 69 | "year": [ 70 | "ؤری" 71 | ], 72 | "month": [ 73 | "رٮ۪تھ" 74 | ], 75 | "week": [ 76 | "ہفتہٕ" 77 | ], 78 | "day": [ 79 | "دۄہ" 80 | ], 81 | "hour": [ 82 | "گٲنٛٹہٕ" 83 | ], 84 | "minute": [ 85 | "مِنَٹ" 86 | ], 87 | "second": [ 88 | "سٮ۪کَنڑ" 89 | ], 90 | "relative-type": { 91 | "0 day ago": [ 92 | "اَز" 93 | ], 94 | "0 hour ago": [ 95 | "this hour" 96 | ], 97 | "0 minute ago": [ 98 | "this minute" 99 | ], 100 | "0 month ago": [ 101 | "this month" 102 | ], 103 | "0 second ago": [ 104 | "now" 105 | ], 106 | "0 week ago": [ 107 | "this week" 108 | ], 109 | "0 year ago": [ 110 | "this year" 111 | ], 112 | "1 day ago": [ 113 | "راتھ" 114 | ], 115 | "1 month ago": [ 116 | "last month" 117 | ], 118 | "1 week ago": [ 119 | "last week" 120 | ], 121 | "1 year ago": [ 122 | "last year" 123 | ], 124 | "in 1 day": [ 125 | "پگاہ" 126 | ], 127 | "in 1 month": [ 128 | "next month" 129 | ], 130 | "in 1 week": [ 131 | "next week" 132 | ], 133 | "in 1 year": [ 134 | "next year" 135 | ] 136 | }, 137 | "locale_specific": {}, 138 | "skip": [ 139 | " ", 140 | "'", 141 | ",", 142 | "-", 143 | ".", 144 | "/", 145 | ";", 146 | "@", 147 | "[", 148 | "]", 149 | "|", 150 | "," 151 | ] 152 | } 153 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/lrc.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "name": "lrc", 3 | "date_order": "YMD", 4 | "january": [ 5 | "جانڤیە" 6 | ], 7 | "february": [ 8 | "فئڤریە" 9 | ], 10 | "march": [ 11 | "مارس" 12 | ], 13 | "april": [ 14 | "آڤریل" 15 | ], 16 | "may": [ 17 | "مئی" 18 | ], 19 | "june": [ 20 | "جوٙأن" 21 | ], 22 | "july": [ 23 | "جوٙلا" 24 | ], 25 | "august": [ 26 | "آگوست" 27 | ], 28 | "september": [ 29 | "سئپتامر" 30 | ], 31 | "october": [ 32 | "ئوکتوڤر" 33 | ], 34 | "november": [ 35 | "نوڤامر" 36 | ], 37 | "december": [ 38 | "دئسامر" 39 | ], 40 | "monday": [ 41 | "mon" 42 | ], 43 | "tuesday": [ 44 | "tue" 45 | ], 46 | "wednesday": [ 47 | "wed" 48 | ], 49 | "thursday": [ 50 | "thu" 51 | ], 52 | "friday": [ 53 | "fri" 54 | ], 55 | "saturday": [ 56 | "sat" 57 | ], 58 | "sunday": [ 59 | "sun" 60 | ], 61 | "am": [ 62 | "am" 63 | ], 64 | "pm": [ 65 | "pm" 66 | ], 67 | "year": [ 68 | "سال" 69 | ], 70 | "month": [ 71 | "ما" 72 | ], 73 | "week": [ 74 | "ھأفتە" 75 | ], 76 | "day": [ 77 | "روٙز" 78 | ], 79 | "hour": [ 80 | "ساأت" 81 | ], 82 | "minute": [ 83 | "دئیقە" 84 | ], 85 | "second": [ 86 | "ثانیە" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "أمروٙ" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "دیروٙز" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "شوٙصوٙ" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": { 136 | "lrc-IQ": { 137 | "name": "lrc-IQ" 138 | } 139 | }, 140 | "skip": [ 141 | " ", 142 | "'", 143 | ",", 144 | "-", 145 | ".", 146 | "/", 147 | ";", 148 | "@", 149 | "[", 150 | "]", 151 | "|", 152 | "," 153 | ] 154 | } 155 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/mgo.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "name": "mgo", 3 | "date_order": "YMD", 4 | "january": [ 5 | "iməg mbegtug", 6 | "mbegtug" 7 | ], 8 | "february": [ 9 | "imeg àbùbì" 10 | ], 11 | "march": [ 12 | "imeg mbəŋchubi" 13 | ], 14 | "april": [ 15 | "iməg ngwə̀t" 16 | ], 17 | "may": [ 18 | "iməg fog" 19 | ], 20 | "june": [ 21 | "iməg ichiibɔd" 22 | ], 23 | "july": [ 24 | "iməg àdùmbə̀ŋ" 25 | ], 26 | "august": [ 27 | "iməg ichika" 28 | ], 29 | "september": [ 30 | "iməg kud" 31 | ], 32 | "october": [ 33 | "iməg tèsi'e" 34 | ], 35 | "november": [ 36 | "iməg zò" 37 | ], 38 | "december": [ 39 | "iməg krizmed" 40 | ], 41 | "monday": [ 42 | "aneg 2" 43 | ], 44 | "tuesday": [ 45 | "aneg 3" 46 | ], 47 | "wednesday": [ 48 | "aneg 4" 49 | ], 50 | "thursday": [ 51 | "aneg 5" 52 | ], 53 | "friday": [ 54 | "aneg 6" 55 | ], 56 | "saturday": [ 57 | "aneg 7" 58 | ], 59 | "sunday": [ 60 | "aneg 1" 61 | ], 62 | "am": [ 63 | "am" 64 | ], 65 | "pm": [ 66 | "pm" 67 | ], 68 | "year": [ 69 | "fitu'" 70 | ], 71 | "month": [ 72 | "iməg" 73 | ], 74 | "week": [ 75 | "nkap" 76 | ], 77 | "day": [ 78 | "anəg" 79 | ], 80 | "hour": [ 81 | "hour" 82 | ], 83 | "minute": [ 84 | "minute" 85 | ], 86 | "second": [ 87 | "second" 88 | ], 89 | "relative-type": { 90 | "0 day ago": [ 91 | "tèchɔ̀ŋ" 92 | ], 93 | "0 hour ago": [ 94 | "this hour" 95 | ], 96 | "0 minute ago": [ 97 | "this minute" 98 | ], 99 | "0 month ago": [ 100 | "this month" 101 | ], 102 | "0 second ago": [ 103 | "now" 104 | ], 105 | "0 week ago": [ 106 | "this week" 107 | ], 108 | "0 year ago": [ 109 | "this year" 110 | ], 111 | "1 day ago": [ 112 | "ikwiri" 113 | ], 114 | "1 month ago": [ 115 | "last month" 116 | ], 117 | "1 week ago": [ 118 | "last week" 119 | ], 120 | "1 year ago": [ 121 | "last year" 122 | ], 123 | "in 1 day": [ 124 | "isu" 125 | ], 126 | "in 1 month": [ 127 | "next month" 128 | ], 129 | "in 1 week": [ 130 | "next week" 131 | ], 132 | "in 1 year": [ 133 | "next year" 134 | ] 135 | }, 136 | "locale_specific": {}, 137 | "skip": [ 138 | " ", 139 | "'", 140 | ",", 141 | "-", 142 | ".", 143 | "/", 144 | ";", 145 | "@", 146 | "[", 147 | "]", 148 | "|", 149 | "," 150 | ] 151 | } 152 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/pa-Arab.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "name": "pa-Arab", 3 | "date_order": "DMY", 4 | "january": [ 5 | "جنوری" 6 | ], 7 | "february": [ 8 | "فروری" 9 | ], 10 | "march": [ 11 | "مارچ" 12 | ], 13 | "april": [ 14 | "اپریل" 15 | ], 16 | "may": [ 17 | "مئ" 18 | ], 19 | "june": [ 20 | "جون" 21 | ], 22 | "july": [ 23 | "جولائی" 24 | ], 25 | "august": [ 26 | "اگست" 27 | ], 28 | "september": [ 29 | "ستمبر" 30 | ], 31 | "october": [ 32 | "اکتوبر" 33 | ], 34 | "november": [ 35 | "نومبر" 36 | ], 37 | "december": [ 38 | "دسمبر" 39 | ], 40 | "monday": [ 41 | "پیر" 42 | ], 43 | "tuesday": [ 44 | "منگل" 45 | ], 46 | "wednesday": [ 47 | "بُدھ" 48 | ], 49 | "thursday": [ 50 | "جمعرات" 51 | ], 52 | "friday": [ 53 | "جمعہ" 54 | ], 55 | "saturday": [ 56 | "ہفتہ" 57 | ], 58 | "sunday": [ 59 | "اتوار" 60 | ], 61 | "am": [ 62 | "am" 63 | ], 64 | "pm": [ 65 | "pm" 66 | ], 67 | "year": [ 68 | "ورھا" 69 | ], 70 | "month": [ 71 | "مہينا" 72 | ], 73 | "week": [ 74 | "ہفتہ" 75 | ], 76 | "day": [ 77 | "دئن" 78 | ], 79 | "hour": [ 80 | "گھنٹا" 81 | ], 82 | "minute": [ 83 | "منٹ" 84 | ], 85 | "second": [ 86 | "second" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "today" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "yesterday" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "tomorrow" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": {}, 136 | "skip": [ 137 | " ", 138 | "'", 139 | ",", 140 | "-", 141 | ".", 142 | "/", 143 | ";", 144 | "@", 145 | "[", 146 | "]", 147 | "|", 148 | "," 149 | ] 150 | } 151 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/ps.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "name": "ps", 3 | "date_order": "YMD", 4 | "january": [ 5 | "جنوري" 6 | ], 7 | "february": [ 8 | "فبروري" 9 | ], 10 | "march": [ 11 | "مارچ" 12 | ], 13 | "april": [ 14 | "اپریل" 15 | ], 16 | "may": [ 17 | "مۍ" 18 | ], 19 | "june": [ 20 | "جون" 21 | ], 22 | "july": [ 23 | "جولای" 24 | ], 25 | "august": [ 26 | "اګست" 27 | ], 28 | "september": [ 29 | "سپتمبر" 30 | ], 31 | "october": [ 32 | "اکتوبر" 33 | ], 34 | "november": [ 35 | "نومبر" 36 | ], 37 | "december": [ 38 | "دسمبر" 39 | ], 40 | "monday": [ 41 | "دوشنبه" 42 | ], 43 | "tuesday": [ 44 | "سه‌شنبه" 45 | ], 46 | "wednesday": [ 47 | "چهارشنبه" 48 | ], 49 | "thursday": [ 50 | "پنجشنبه" 51 | ], 52 | "friday": [ 53 | "جمعه" 54 | ], 55 | "saturday": [ 56 | "شنبه" 57 | ], 58 | "sunday": [ 59 | "یکشنبه" 60 | ], 61 | "am": [ 62 | "غم" 63 | ], 64 | "pm": [ 65 | "غو" 66 | ], 67 | "year": [ 68 | "year" 69 | ], 70 | "month": [ 71 | "month" 72 | ], 73 | "week": [ 74 | "week" 75 | ], 76 | "day": [ 77 | "day" 78 | ], 79 | "hour": [ 80 | "hour" 81 | ], 82 | "minute": [ 83 | "minute" 84 | ], 85 | "second": [ 86 | "second" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "today" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "yesterday" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "tomorrow" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": {}, 136 | "skip": [ 137 | " ", 138 | "'", 139 | ",", 140 | "-", 141 | ".", 142 | "/", 143 | ";", 144 | "@", 145 | "[", 146 | "]", 147 | "|", 148 | "," 149 | ] 150 | } 151 | -------------------------------------------------------------------------------- /dateparser/data/date_translation_data/tl.py: -------------------------------------------------------------------------------- 1 | info = { 2 | "sentence_splitter_group": 1, 3 | "skip": [ 4 | "ganap", 5 | "na", 6 | "noon", 7 | "noong", 8 | "sa", 9 | " ", 10 | "'", 11 | ",", 12 | "-", 13 | ".", 14 | "/", 15 | ";", 16 | "@", 17 | "[", 18 | "]", 19 | "|", 20 | "," 21 | ], 22 | "monday": [ 23 | "Lunes", 24 | "Lun" 25 | ], 26 | "tuesday": [ 27 | "Martes" 28 | ], 29 | "wednesday": [ 30 | "Miyerkules", 31 | "Miy" 32 | ], 33 | "thursday": [ 34 | "Huwebes", 35 | "Huw" 36 | ], 37 | "friday": [ 38 | "Biyernes", 39 | "Biy" 40 | ], 41 | "saturday": [ 42 | "Sabado", 43 | "Sab" 44 | ], 45 | "sunday": [ 46 | "Linggo", 47 | "Lin" 48 | ], 49 | "january": [ 50 | "Enero", 51 | "Ene" 52 | ], 53 | "february": [ 54 | "Pebrero", 55 | "Peb" 56 | ], 57 | "march": [ 58 | "Marso", 59 | "Mar" 60 | ], 61 | "april": [ 62 | "Abril", 63 | "Abr" 64 | ], 65 | "may": [ 66 | "Mayo", 67 | "May" 68 | ], 69 | "june": [ 70 | "Hunyo", 71 | "Hun" 72 | ], 73 | "july": [ 74 | "Hulyo", 75 | "Hul" 76 | ], 77 | "august": [ 78 | "Agosto", 79 | "Ago" 80 | ], 81 | "september": [ 82 | "Setyembre", 83 | "Set" 84 | ], 85 | "october": [ 86 | "Oktubre", 87 | "Okt" 88 | ], 89 | "november": [ 90 | "Nobyembre", 91 | "Nob" 92 | ], 93 | "december": [ 94 | "Disyembre", 95 | "Dis" 96 | ], 97 | "year": [ 98 | "taon" 99 | ], 100 | "month": [ 101 | "buwan" 102 | ], 103 | "week": [ 104 | "linggo" 105 | ], 106 | "day": [ 107 | "araw" 108 | ], 109 | "hour": [ 110 | "oras" 111 | ], 112 | "minute": [ 113 | "minuto" 114 | ], 115 | "second": [ 116 | "segundo" 117 | ], 118 | "ago": [ 119 | "nakaraan", 120 | "nakalipas" 121 | ], 122 | "in": [ 123 | "sa" 124 | ], 125 | "simplifications": [ 126 | { 127 | "kahapon": "1 araw nakaraan" 128 | }, 129 | { 130 | "ngayon": "0 segundo nakalipas" 131 | }, 132 | { 133 | "isang araw": "2 araw" 134 | } 135 | ], 136 | "name": "tl" 137 | } 138 | -------------------------------------------------------------------------------- /dateparser/data/dateparser_tz_cache.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/dateparser/data/dateparser_tz_cache.pkl -------------------------------------------------------------------------------- /dateparser/date_parser.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from tzlocal import get_localzone 4 | 5 | from .conf import apply_settings 6 | from .timezone_parser import pop_tz_offset_from_string 7 | from .utils import apply_timezone, localize_timezone, strip_braces 8 | 9 | 10 | class DateParser: 11 | @apply_settings 12 | def parse(self, date_string, parse_method, settings=None): 13 | date_string = str(date_string) 14 | 15 | if not date_string.strip(): 16 | raise ValueError("Empty string") 17 | 18 | date_string = strip_braces(date_string) 19 | date_string, ptz = pop_tz_offset_from_string(date_string) 20 | 21 | date_obj, period = parse_method(date_string, settings=settings, tz=ptz) 22 | 23 | _settings_tz = settings.TIMEZONE.lower() 24 | 25 | if ptz: 26 | if hasattr(ptz, "localize"): 27 | date_obj = ptz.localize(date_obj) 28 | else: 29 | date_obj = date_obj.replace(tzinfo=ptz) 30 | if "local" not in _settings_tz: 31 | date_obj = apply_timezone(date_obj, settings.TIMEZONE) 32 | else: 33 | if "local" in _settings_tz: 34 | stz = get_localzone() 35 | if hasattr(stz, "localize") and sys.version_info < (3, 6): 36 | date_obj = stz.localize(date_obj) 37 | else: 38 | date_obj = date_obj.replace(tzinfo=stz) 39 | else: 40 | date_obj = localize_timezone(date_obj, settings.TIMEZONE) 41 | 42 | if settings.TO_TIMEZONE: 43 | date_obj = apply_timezone(date_obj, settings.TO_TIMEZONE) 44 | 45 | if not settings.RETURN_AS_TIMEZONE_AWARE or ( 46 | settings.RETURN_AS_TIMEZONE_AWARE 47 | and "default" == settings.RETURN_AS_TIMEZONE_AWARE 48 | and not ptz 49 | ): 50 | date_obj = date_obj.replace(tzinfo=None) 51 | 52 | return date_obj, period 53 | 54 | 55 | date_parser = DateParser() 56 | -------------------------------------------------------------------------------- /dateparser/languages/__init__.py: -------------------------------------------------------------------------------- 1 | from .loader import default_loader 2 | from .locale import Locale 3 | -------------------------------------------------------------------------------- /dateparser/search/__init__.py: -------------------------------------------------------------------------------- 1 | from dateparser.search.search import DateSearchWithDetection 2 | 3 | _search_with_detection = DateSearchWithDetection() 4 | 5 | 6 | def search_dates( 7 | text, 8 | languages=None, 9 | settings=None, 10 | add_detected_language=False, 11 | detect_languages_function=None, 12 | ): 13 | """Find all substrings of the given string which represent date and/or time and parse them. 14 | 15 | :param text: 16 | A string in a natural language which may contain date and/or time expressions. 17 | :type text: str 18 | 19 | :param languages: 20 | A list of two letters language codes.e.g. ['en', 'es']. If languages are given, it will 21 | not attempt to detect the language. 22 | :type languages: list 23 | 24 | :param settings: 25 | Configure customized behavior using settings defined in :mod:`dateparser.conf.Settings`. 26 | :type settings: dict 27 | 28 | :param add_detected_language: 29 | Indicates if we want the detected language returned in the tuple. 30 | :type add_detected_language: bool 31 | 32 | :param detect_languages_function: 33 | A function for language detection that takes as input a `text` and a `confidence_threshold`, 34 | and returns a list of detected language codes. 35 | Note: detect_languages_function is only uses if `languages` are not provided. 36 | :type detect_languages_function: function 37 | 38 | :return: Returns list of tuples containing: 39 | substrings representing date and/or time, corresponding :mod:`datetime.datetime` 40 | object and detected language if *add_detected_language* is True. 41 | Returns None if no dates that can be parsed are found. 42 | :rtype: list 43 | :raises: ValueError - Unknown Language 44 | 45 | >>> from dateparser.search import search_dates 46 | >>> search_dates('The first artificial Earth satellite was launched on 4 October 1957.') 47 | [('on 4 October 1957', datetime.datetime(1957, 10, 4, 0, 0))] 48 | 49 | >>> search_dates('The first artificial Earth satellite was launched on 4 October 1957.', 50 | >>> add_detected_language=True) 51 | [('on 4 October 1957', datetime.datetime(1957, 10, 4, 0, 0), 'en')] 52 | 53 | >>> search_dates("The client arrived to the office for the first time in March 3rd, 2004 " 54 | >>> "and got serviced, after a couple of months, on May 6th 2004, the customer " 55 | >>> "returned indicating a defect on the part") 56 | [('in March 3rd, 2004 and', datetime.datetime(2004, 3, 3, 0, 0)), 57 | ('on May 6th 2004', datetime.datetime(2004, 5, 6, 0, 0))] 58 | 59 | """ 60 | text = _search_with_detection.preprocess_text(text, languages) 61 | 62 | result = _search_with_detection.search_dates( 63 | text=text, 64 | languages=languages, 65 | settings=settings, 66 | detect_languages_function=detect_languages_function, 67 | ) 68 | dates = result.get("Dates") 69 | if dates: 70 | if add_detected_language: 71 | language = result.get("Language") 72 | dates = [date + (language,) for date in dates] 73 | return dates 74 | -------------------------------------------------------------------------------- /dateparser/search/detection.py: -------------------------------------------------------------------------------- 1 | from functools import wraps 2 | 3 | 4 | def _restore_languages_on_generator_exit(method): 5 | @wraps(method) 6 | def wrapped(self, *args, **kwargs): 7 | stored_languages = self.languages[:] 8 | for language in method(self, *args, **kwargs): 9 | yield language 10 | else: 11 | self.languages[:] = stored_languages 12 | 13 | return wrapped 14 | 15 | 16 | class BaseLanguageDetector: 17 | def __init__(self, languages): 18 | self.languages = languages[:] 19 | 20 | @_restore_languages_on_generator_exit 21 | def iterate_applicable_languages(self, date_string, settings=None, modify=False): 22 | languages = self.languages if modify else self.languages[:] 23 | yield from self._filter_languages(date_string, languages, settings) 24 | 25 | @staticmethod 26 | def _filter_languages(date_string, languages, settings=None): 27 | while languages: 28 | language = languages[0] 29 | if language.is_applicable( 30 | date_string, strip_timezone=False, settings=settings 31 | ): 32 | yield language 33 | elif language.is_applicable( 34 | date_string, strip_timezone=True, settings=settings 35 | ): 36 | yield language 37 | 38 | languages.pop(0) 39 | 40 | 41 | class AutoDetectLanguage(BaseLanguageDetector): 42 | def __init__(self, languages, allow_redetection=False): 43 | super().__init__(languages=languages[:]) 44 | self.language_pool = languages[:] 45 | self.allow_redetection = allow_redetection 46 | 47 | @_restore_languages_on_generator_exit 48 | def iterate_applicable_languages(self, date_string, modify=False, settings=None): 49 | languages = self.languages if modify else self.languages[:] 50 | initial_languages = languages[:] 51 | yield from self._filter_languages(date_string, languages, settings=settings) 52 | 53 | if not self.allow_redetection: 54 | return 55 | 56 | # Try languages that was not tried before with this date_string 57 | languages = [ 58 | language 59 | for language in self.language_pool 60 | if language not in initial_languages 61 | ] 62 | if modify: 63 | self.languages = languages 64 | 65 | yield from self._filter_languages(date_string, languages, settings=settings) 66 | 67 | 68 | class ExactLanguages(BaseLanguageDetector): 69 | def __init__(self, languages): 70 | if languages is None: 71 | raise ValueError("language cannot be None for ExactLanguages") 72 | super().__init__(languages=languages) 73 | 74 | @_restore_languages_on_generator_exit 75 | def iterate_applicable_languages(self, date_string, modify=False, settings=None): 76 | yield from super().iterate_applicable_languages( 77 | date_string, modify=False, settings=settings 78 | ) 79 | -------------------------------------------------------------------------------- /dateparser_cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/dateparser_cli/__init__.py -------------------------------------------------------------------------------- /dateparser_cli/cli.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import logging 3 | 4 | from .fasttext_manager import fasttext_downloader 5 | from .utils import clear_cache 6 | 7 | 8 | def entrance(): 9 | dateparser_argparse = argparse.ArgumentParser( 10 | description="dateparser download manager." 11 | ) 12 | dateparser_argparse.add_argument( 13 | "--fasttext", 14 | type=str, 15 | help='To download a fasttext language detection models. Supported models are "small" and "large"', 16 | ) 17 | dateparser_argparse.add_argument( 18 | "--clear", 19 | "--clear-cache", 20 | help="To clear all cached models", 21 | action="store_true", 22 | ) 23 | 24 | args = dateparser_argparse.parse_args() 25 | 26 | if args.clear: 27 | clear_cache() 28 | logging.info("dateparser-download: All cache deleted") 29 | 30 | if args.fasttext: 31 | fasttext_downloader(args.fasttext) 32 | 33 | if not (args.clear or args.fasttext): 34 | dateparser_argparse.error( 35 | "dateparser-download: You need to specify the command (i.e.: --fasttext or --clear)" 36 | ) 37 | -------------------------------------------------------------------------------- /dateparser_cli/exceptions.py: -------------------------------------------------------------------------------- 1 | class FastTextModelNotFoundException(Exception): 2 | pass 3 | -------------------------------------------------------------------------------- /dateparser_cli/fasttext_manager.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | import urllib.request 4 | from pathlib import Path 5 | 6 | from .exceptions import FastTextModelNotFoundException 7 | from .utils import create_data_model_home, dateparser_model_home 8 | 9 | 10 | def fasttext_downloader(model_name): 11 | create_data_model_home() 12 | models = { 13 | "small": "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.ftz", 14 | "large": "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin", 15 | } 16 | if model_name not in models: 17 | message = 'dateparser-download: Couldn\'t find a model called "{}". Supported models are: {}'.format( 18 | model_name, ", ".join(models.keys()) 19 | ) 20 | raise FastTextModelNotFoundException(message) 21 | 22 | models_directory_path = os.path.join(dateparser_model_home, (model_name + ".bin")) 23 | 24 | if not Path(models_directory_path).is_file(): 25 | model_url = models[model_name] 26 | logging.info( 27 | 'dateparser-download: Downloading model "{}" from "{}"...'.format( 28 | model_name, model_url 29 | ) 30 | ) 31 | try: 32 | urllib.request.urlretrieve(model_url, models_directory_path) 33 | except urllib.error.HTTPError as e: 34 | raise Exception( 35 | "dateparser-download: Fasttext model cannot be downloaded due to HTTP error" 36 | ) from e 37 | else: 38 | logging.info( 39 | 'dateparser-download: The model "{}" is already downloaded'.format( 40 | model_name 41 | ) 42 | ) 43 | -------------------------------------------------------------------------------- /dateparser_cli/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | from pathlib import Path 4 | 5 | DEFAULT_DIR_NAME = "dateparser_models" 6 | DEFAULT_UNIX_CACHE_DIR = "~/.cache" 7 | 8 | DEFAULT_WINDOWS_CACHE_DIR = os.path.join(Path.home(), "AppData", "Roaming") 9 | 10 | 11 | if sys.platform.startswith("win"): 12 | # For Windows: 13 | _cache_dir = DEFAULT_WINDOWS_CACHE_DIR 14 | else: 15 | # UNIX & OS X: 16 | _cache_dir = DEFAULT_UNIX_CACHE_DIR 17 | 18 | dateparser_model_home = os.path.expanduser(os.path.join(_cache_dir, DEFAULT_DIR_NAME)) 19 | 20 | 21 | def create_data_model_home(): 22 | os.makedirs(dateparser_model_home, exist_ok=True) 23 | 24 | 25 | def clear_cache(*args): 26 | for path in Path(dateparser_model_home).rglob("*.*"): 27 | os.remove(path) 28 | -------------------------------------------------------------------------------- /dateparser_data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/dateparser_data/__init__.py -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/as.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "as", 3 | "date_order": "YMD", 4 | "january": [ 5 | "জানু", 6 | "জানুৱাৰী" 7 | ], 8 | "february": [ 9 | "ফেব্ৰু", 10 | "ফেব্ৰুৱাৰী" 11 | ], 12 | "march": [ 13 | "মাৰ্চ" 14 | ], 15 | "april": [ 16 | "এপ্ৰিল" 17 | ], 18 | "may": [ 19 | "মে" 20 | ], 21 | "june": [ 22 | "জুন" 23 | ], 24 | "july": [ 25 | "জুলাই" 26 | ], 27 | "august": [ 28 | "আগ", 29 | "আগষ্ট" 30 | ], 31 | "september": [ 32 | "ছেপ্তেম্বৰ", 33 | "সেপ্ট" 34 | ], 35 | "october": [ 36 | "অক্টো", 37 | "অক্টোবৰ" 38 | ], 39 | "november": [ 40 | "নভে", 41 | "নৱেম্বৰ" 42 | ], 43 | "december": [ 44 | "ডিচেম্বৰ", 45 | "ডিসে" 46 | ], 47 | "monday": [ 48 | "সোম", 49 | "সোমবাৰ" 50 | ], 51 | "tuesday": [ 52 | "মঙ্গল", 53 | "মঙ্গলবাৰ" 54 | ], 55 | "wednesday": [ 56 | "বুধ", 57 | "বুধবাৰ" 58 | ], 59 | "thursday": [ 60 | "বৃহষ্পতি", 61 | "বৃহষ্পতিবাৰ" 62 | ], 63 | "friday": [ 64 | "শুক্ৰ", 65 | "শুক্ৰবাৰ" 66 | ], 67 | "saturday": [ 68 | "শনি", 69 | "শনিবাৰ" 70 | ], 71 | "sunday": [ 72 | "দেওবাৰ", 73 | "ৰবি" 74 | ], 75 | "am": [ 76 | "পূৰ্বাহ্ণ" 77 | ], 78 | "pm": [ 79 | "অপৰাহ্ণ" 80 | ], 81 | "year": [ 82 | "বছৰ" 83 | ], 84 | "month": [ 85 | "মাহ" 86 | ], 87 | "week": [ 88 | "সপ্তাহ" 89 | ], 90 | "day": [ 91 | "দিন" 92 | ], 93 | "hour": [ 94 | "ঘণ্টা" 95 | ], 96 | "minute": [ 97 | "মিনিট" 98 | ], 99 | "second": [ 100 | "ছেকেণ্ড" 101 | ], 102 | "relative-type": { 103 | "0 day ago": [ 104 | "আজি" 105 | ], 106 | "0 hour ago": [ 107 | "this hour" 108 | ], 109 | "0 minute ago": [ 110 | "this minute" 111 | ], 112 | "0 month ago": [ 113 | "this month" 114 | ], 115 | "0 second ago": [ 116 | "now" 117 | ], 118 | "0 week ago": [ 119 | "this week" 120 | ], 121 | "0 year ago": [ 122 | "this year" 123 | ], 124 | "1 day ago": [ 125 | "কালি" 126 | ], 127 | "1 month ago": [ 128 | "last month" 129 | ], 130 | "1 week ago": [ 131 | "last week" 132 | ], 133 | "1 year ago": [ 134 | "last year" 135 | ], 136 | "in 1 day": [ 137 | "কাইলৈ" 138 | ], 139 | "in 1 month": [ 140 | "next month" 141 | ], 142 | "in 1 week": [ 143 | "next week" 144 | ], 145 | "in 1 year": [ 146 | "next year" 147 | ] 148 | }, 149 | "locale_specific": {} 150 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/az-Cyrl.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "az-Cyrl", 3 | "date_order": "DMY", 4 | "january": [ 5 | "јан", 6 | "јанвар" 7 | ], 8 | "february": [ 9 | "фев", 10 | "феврал" 11 | ], 12 | "march": [ 13 | "мар", 14 | "март" 15 | ], 16 | "april": [ 17 | "апр", 18 | "апрел" 19 | ], 20 | "may": [ 21 | "май" 22 | ], 23 | "june": [ 24 | "ијн", 25 | "ијун" 26 | ], 27 | "july": [ 28 | "ијл", 29 | "ијул" 30 | ], 31 | "august": [ 32 | "авг", 33 | "август" 34 | ], 35 | "september": [ 36 | "сен", 37 | "сентјабр" 38 | ], 39 | "october": [ 40 | "окт", 41 | "октјабр" 42 | ], 43 | "november": [ 44 | "ној", 45 | "нојабр" 46 | ], 47 | "december": [ 48 | "дек", 49 | "декабр" 50 | ], 51 | "monday": [ 52 | "базар ертәси", 53 | "бе" 54 | ], 55 | "tuesday": [ 56 | "ча", 57 | "чәршәнбә ахшамы" 58 | ], 59 | "wednesday": [ 60 | "ч", 61 | "чәршәнбә" 62 | ], 63 | "thursday": [ 64 | "ҹа", 65 | "ҹүмә ахшамы" 66 | ], 67 | "friday": [ 68 | "ҹ", 69 | "ҹүмә" 70 | ], 71 | "saturday": [ 72 | "ш", 73 | "шәнбә" 74 | ], 75 | "sunday": [ 76 | "б", 77 | "базар" 78 | ], 79 | "am": [ 80 | "ам" 81 | ], 82 | "pm": [ 83 | "пм" 84 | ], 85 | "year": [ 86 | "year" 87 | ], 88 | "month": [ 89 | "month" 90 | ], 91 | "week": [ 92 | "week" 93 | ], 94 | "day": [ 95 | "day" 96 | ], 97 | "hour": [ 98 | "hour" 99 | ], 100 | "minute": [ 101 | "minute" 102 | ], 103 | "second": [ 104 | "second" 105 | ], 106 | "relative-type": { 107 | "0 day ago": [ 108 | "today" 109 | ], 110 | "0 hour ago": [ 111 | "this hour" 112 | ], 113 | "0 minute ago": [ 114 | "this minute" 115 | ], 116 | "0 month ago": [ 117 | "this month" 118 | ], 119 | "0 second ago": [ 120 | "now" 121 | ], 122 | "0 week ago": [ 123 | "this week" 124 | ], 125 | "0 year ago": [ 126 | "this year" 127 | ], 128 | "1 day ago": [ 129 | "yesterday" 130 | ], 131 | "1 month ago": [ 132 | "last month" 133 | ], 134 | "1 week ago": [ 135 | "last week" 136 | ], 137 | "1 year ago": [ 138 | "last year" 139 | ], 140 | "in 1 day": [ 141 | "tomorrow" 142 | ], 143 | "in 1 month": [ 144 | "next month" 145 | ], 146 | "in 1 week": [ 147 | "next week" 148 | ], 149 | "in 1 year": [ 150 | "next year" 151 | ] 152 | }, 153 | "locale_specific": {} 154 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/bem.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bem", 3 | "date_order": "DMY", 4 | "january": [ 5 | "jan", 6 | "januari" 7 | ], 8 | "february": [ 9 | "feb", 10 | "februari" 11 | ], 12 | "march": [ 13 | "mac", 14 | "machi" 15 | ], 16 | "april": [ 17 | "epr", 18 | "epreo" 19 | ], 20 | "may": [ 21 | "mei" 22 | ], 23 | "june": [ 24 | "jun", 25 | "juni" 26 | ], 27 | "july": [ 28 | "jul", 29 | "julai" 30 | ], 31 | "august": [ 32 | "oga", 33 | "ogasti" 34 | ], 35 | "september": [ 36 | "sep", 37 | "septemba" 38 | ], 39 | "october": [ 40 | "okt", 41 | "oktoba" 42 | ], 43 | "november": [ 44 | "nov", 45 | "novemba" 46 | ], 47 | "december": [ 48 | "dis", 49 | "disemba" 50 | ], 51 | "monday": [ 52 | "palichimo" 53 | ], 54 | "tuesday": [ 55 | "palichibuli" 56 | ], 57 | "wednesday": [ 58 | "palichitatu" 59 | ], 60 | "thursday": [ 61 | "palichine" 62 | ], 63 | "friday": [ 64 | "palichisano" 65 | ], 66 | "saturday": [ 67 | "pachibelushi" 68 | ], 69 | "sunday": [ 70 | "pa mulungu" 71 | ], 72 | "am": [ 73 | "uluchelo" 74 | ], 75 | "pm": [ 76 | "akasuba" 77 | ], 78 | "year": [ 79 | "umwaka" 80 | ], 81 | "month": [ 82 | "umweshi" 83 | ], 84 | "week": [ 85 | "umulungu" 86 | ], 87 | "day": [ 88 | "ubushiku" 89 | ], 90 | "hour": [ 91 | "insa" 92 | ], 93 | "minute": [ 94 | "mineti" 95 | ], 96 | "second": [ 97 | "sekondi" 98 | ], 99 | "relative-type": { 100 | "0 day ago": [ 101 | "lelo" 102 | ], 103 | "0 hour ago": [ 104 | "this hour" 105 | ], 106 | "0 minute ago": [ 107 | "this minute" 108 | ], 109 | "0 month ago": [ 110 | "this month" 111 | ], 112 | "0 second ago": [ 113 | "now" 114 | ], 115 | "0 week ago": [ 116 | "this week" 117 | ], 118 | "0 year ago": [ 119 | "this year" 120 | ], 121 | "1 day ago": [ 122 | "yesterday" 123 | ], 124 | "1 month ago": [ 125 | "last month" 126 | ], 127 | "1 week ago": [ 128 | "last week" 129 | ], 130 | "1 year ago": [ 131 | "last year" 132 | ], 133 | "in 1 day": [ 134 | "tomorrow" 135 | ], 136 | "in 1 month": [ 137 | "next month" 138 | ], 139 | "in 1 week": [ 140 | "next week" 141 | ], 142 | "in 1 year": [ 143 | "next year" 144 | ] 145 | }, 146 | "locale_specific": {} 147 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/bm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bm", 3 | "date_order": "DMY", 4 | "january": [ 5 | "zan", 6 | "zanwuye" 7 | ], 8 | "february": [ 9 | "feb", 10 | "feburuye" 11 | ], 12 | "march": [ 13 | "mar", 14 | "marisi" 15 | ], 16 | "april": [ 17 | "awi", 18 | "awirili" 19 | ], 20 | "may": [ 21 | "mɛ" 22 | ], 23 | "june": [ 24 | "zuw", 25 | "zuwɛn" 26 | ], 27 | "july": [ 28 | "zul", 29 | "zuluye" 30 | ], 31 | "august": [ 32 | "uti" 33 | ], 34 | "september": [ 35 | "sɛt", 36 | "sɛtanburu" 37 | ], 38 | "october": [ 39 | "ɔku", 40 | "ɔkutɔburu" 41 | ], 42 | "november": [ 43 | "now", 44 | "nowanburu" 45 | ], 46 | "december": [ 47 | "des", 48 | "desanburu" 49 | ], 50 | "monday": [ 51 | "ntɛ", 52 | "ntɛnɛ" 53 | ], 54 | "tuesday": [ 55 | "tar", 56 | "tarata" 57 | ], 58 | "wednesday": [ 59 | "ara", 60 | "araba" 61 | ], 62 | "thursday": [ 63 | "ala", 64 | "alamisa" 65 | ], 66 | "friday": [ 67 | "jum", 68 | "juma" 69 | ], 70 | "saturday": [ 71 | "sib", 72 | "sibiri" 73 | ], 74 | "sunday": [ 75 | "kar", 76 | "kari" 77 | ], 78 | "am": [ 79 | "am" 80 | ], 81 | "pm": [ 82 | "pm" 83 | ], 84 | "year": [ 85 | "san" 86 | ], 87 | "month": [ 88 | "kalo" 89 | ], 90 | "week": [ 91 | "dɔgɔkun" 92 | ], 93 | "day": [ 94 | "don" 95 | ], 96 | "hour": [ 97 | "lɛrɛ" 98 | ], 99 | "minute": [ 100 | "miniti" 101 | ], 102 | "second": [ 103 | "sekondi" 104 | ], 105 | "relative-type": { 106 | "0 day ago": [ 107 | "bi" 108 | ], 109 | "0 hour ago": [ 110 | "this hour" 111 | ], 112 | "0 minute ago": [ 113 | "this minute" 114 | ], 115 | "0 month ago": [ 116 | "this month" 117 | ], 118 | "0 second ago": [ 119 | "now" 120 | ], 121 | "0 week ago": [ 122 | "this week" 123 | ], 124 | "0 year ago": [ 125 | "this year" 126 | ], 127 | "1 day ago": [ 128 | "kunu" 129 | ], 130 | "1 month ago": [ 131 | "last month" 132 | ], 133 | "1 week ago": [ 134 | "last week" 135 | ], 136 | "1 year ago": [ 137 | "last year" 138 | ], 139 | "in 1 day": [ 140 | "sini" 141 | ], 142 | "in 1 month": [ 143 | "next month" 144 | ], 145 | "in 1 week": [ 146 | "next week" 147 | ], 148 | "in 1 year": [ 149 | "next year" 150 | ] 151 | }, 152 | "locale_specific": {} 153 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/brx.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "brx", 3 | "date_order": "MDY", 4 | "january": [ 5 | "जानुवारी" 6 | ], 7 | "february": [ 8 | "फेब्रुवारी" 9 | ], 10 | "march": [ 11 | "मार्स" 12 | ], 13 | "april": [ 14 | "एफ्रिल" 15 | ], 16 | "may": [ 17 | "मे" 18 | ], 19 | "june": [ 20 | "जुन" 21 | ], 22 | "july": [ 23 | "जुलाइ" 24 | ], 25 | "august": [ 26 | "आगस्थ" 27 | ], 28 | "september": [ 29 | "सेबथेज्ब़र" 30 | ], 31 | "october": [ 32 | "अखथबर" 33 | ], 34 | "november": [ 35 | "नबेज्ब़र" 36 | ], 37 | "december": [ 38 | "दिसेज्ब़र" 39 | ], 40 | "monday": [ 41 | "सम", 42 | "समबार" 43 | ], 44 | "tuesday": [ 45 | "मंगल", 46 | "मंगलबार" 47 | ], 48 | "wednesday": [ 49 | "बुद", 50 | "बुदबार" 51 | ], 52 | "thursday": [ 53 | "बिसथि", 54 | "बिसथिबार" 55 | ], 56 | "friday": [ 57 | "सुखुर", 58 | "सुखुरबार" 59 | ], 60 | "saturday": [ 61 | "सुनि", 62 | "सुनिबार" 63 | ], 64 | "sunday": [ 65 | "रबि", 66 | "रबिबार" 67 | ], 68 | "am": [ 69 | "फुं" 70 | ], 71 | "pm": [ 72 | "बेलासे" 73 | ], 74 | "year": [ 75 | "बोसोर" 76 | ], 77 | "month": [ 78 | "दान" 79 | ], 80 | "week": [ 81 | "सबथा/हबथा" 82 | ], 83 | "day": [ 84 | "सान" 85 | ], 86 | "hour": [ 87 | "रिंगा" 88 | ], 89 | "minute": [ 90 | "मिनिथ" 91 | ], 92 | "second": [ 93 | "सेखेन्द" 94 | ], 95 | "relative-type": { 96 | "0 day ago": [ 97 | "दिनै" 98 | ], 99 | "0 hour ago": [ 100 | "this hour" 101 | ], 102 | "0 minute ago": [ 103 | "this minute" 104 | ], 105 | "0 month ago": [ 106 | "this month" 107 | ], 108 | "0 second ago": [ 109 | "now" 110 | ], 111 | "0 week ago": [ 112 | "this week" 113 | ], 114 | "0 year ago": [ 115 | "this year" 116 | ], 117 | "1 day ago": [ 118 | "मैया" 119 | ], 120 | "1 month ago": [ 121 | "last month" 122 | ], 123 | "1 week ago": [ 124 | "last week" 125 | ], 126 | "1 year ago": [ 127 | "last year" 128 | ], 129 | "in 1 day": [ 130 | "गाबोन" 131 | ], 132 | "in 1 month": [ 133 | "next month" 134 | ], 135 | "in 1 week": [ 136 | "next week" 137 | ], 138 | "in 1 year": [ 139 | "next year" 140 | ] 141 | }, 142 | "locale_specific": {} 143 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/ckb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ckb", 3 | "date_order": "YMD", 4 | "january": [ 5 | "کانوونی دووەم" 6 | ], 7 | "february": [ 8 | "شوبات" 9 | ], 10 | "march": [ 11 | "ئازار" 12 | ], 13 | "april": [ 14 | "نیسان" 15 | ], 16 | "may": [ 17 | "ئایار" 18 | ], 19 | "june": [ 20 | "حوزەیران" 21 | ], 22 | "july": [ 23 | "تەمووز" 24 | ], 25 | "august": [ 26 | "ئاب" 27 | ], 28 | "september": [ 29 | "ئەیلوول" 30 | ], 31 | "october": [ 32 | "تشرینی یەکەم" 33 | ], 34 | "november": [ 35 | "تشرینی دووەم" 36 | ], 37 | "december": [ 38 | "کانونی یەکەم" 39 | ], 40 | "monday": [ 41 | "دووشەممە" 42 | ], 43 | "tuesday": [ 44 | "سێشەممە" 45 | ], 46 | "wednesday": [ 47 | "چوارشەممە" 48 | ], 49 | "thursday": [ 50 | "پێنجشەممە" 51 | ], 52 | "friday": [ 53 | "ھەینی" 54 | ], 55 | "saturday": [ 56 | "شەممە" 57 | ], 58 | "sunday": [ 59 | "یەکشەممە" 60 | ], 61 | "am": [ 62 | "بن" 63 | ], 64 | "pm": [ 65 | "دن" 66 | ], 67 | "year": [ 68 | "year" 69 | ], 70 | "month": [ 71 | "month" 72 | ], 73 | "week": [ 74 | "week" 75 | ], 76 | "day": [ 77 | "day" 78 | ], 79 | "hour": [ 80 | "hour" 81 | ], 82 | "minute": [ 83 | "minute" 84 | ], 85 | "second": [ 86 | "second" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "today" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "yesterday" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "tomorrow" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": { 136 | "ckb-IR": { 137 | "name": "ckb-IR" 138 | } 139 | } 140 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/dje.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dje", 3 | "date_order": "DMY", 4 | "january": [ 5 | "žan", 6 | "žanwiye" 7 | ], 8 | "february": [ 9 | "fee", 10 | "feewiriye" 11 | ], 12 | "march": [ 13 | "mar", 14 | "marsi" 15 | ], 16 | "april": [ 17 | "awi", 18 | "awiril" 19 | ], 20 | "may": [ 21 | "me" 22 | ], 23 | "june": [ 24 | "žuw", 25 | "žuweŋ" 26 | ], 27 | "july": [ 28 | "žuy", 29 | "žuyye" 30 | ], 31 | "august": [ 32 | "ut" 33 | ], 34 | "september": [ 35 | "sek", 36 | "sektanbur" 37 | ], 38 | "october": [ 39 | "okt", 40 | "oktoobur" 41 | ], 42 | "november": [ 43 | "noo", 44 | "noowanbur" 45 | ], 46 | "december": [ 47 | "dee", 48 | "deesanbur" 49 | ], 50 | "monday": [ 51 | "ati", 52 | "atinni" 53 | ], 54 | "tuesday": [ 55 | "ata", 56 | "atalaata" 57 | ], 58 | "wednesday": [ 59 | "ala", 60 | "alarba" 61 | ], 62 | "thursday": [ 63 | "alhamisi", 64 | "alm" 65 | ], 66 | "friday": [ 67 | "alz", 68 | "alzuma" 69 | ], 70 | "saturday": [ 71 | "asi", 72 | "asibti" 73 | ], 74 | "sunday": [ 75 | "alh", 76 | "alhadi" 77 | ], 78 | "am": [ 79 | "subbaahi" 80 | ], 81 | "pm": [ 82 | "zaarikay b" 83 | ], 84 | "year": [ 85 | "jiiri" 86 | ], 87 | "month": [ 88 | "handu" 89 | ], 90 | "week": [ 91 | "hebu" 92 | ], 93 | "day": [ 94 | "zaari" 95 | ], 96 | "hour": [ 97 | "guuru" 98 | ], 99 | "minute": [ 100 | "miniti" 101 | ], 102 | "second": [ 103 | "miti" 104 | ], 105 | "relative-type": { 106 | "0 day ago": [ 107 | "hõo" 108 | ], 109 | "0 hour ago": [ 110 | "this hour" 111 | ], 112 | "0 minute ago": [ 113 | "this minute" 114 | ], 115 | "0 month ago": [ 116 | "this month" 117 | ], 118 | "0 second ago": [ 119 | "now" 120 | ], 121 | "0 week ago": [ 122 | "this week" 123 | ], 124 | "0 year ago": [ 125 | "this year" 126 | ], 127 | "1 day ago": [ 128 | "bi" 129 | ], 130 | "1 month ago": [ 131 | "last month" 132 | ], 133 | "1 week ago": [ 134 | "last week" 135 | ], 136 | "1 year ago": [ 137 | "last year" 138 | ], 139 | "in 1 day": [ 140 | "suba" 141 | ], 142 | "in 1 month": [ 143 | "next month" 144 | ], 145 | "in 1 week": [ 146 | "next week" 147 | ], 148 | "in 1 year": [ 149 | "next year" 150 | ] 151 | }, 152 | "locale_specific": {} 153 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/dyo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dyo", 3 | "date_order": "DMY", 4 | "january": [ 5 | "sa", 6 | "sanvie" 7 | ], 8 | "february": [ 9 | "fe", 10 | "fébirie" 11 | ], 12 | "march": [ 13 | "ma", 14 | "mars" 15 | ], 16 | "april": [ 17 | "ab", 18 | "aburil" 19 | ], 20 | "may": [ 21 | "me", 22 | "mee" 23 | ], 24 | "june": [ 25 | "su", 26 | "sueŋ" 27 | ], 28 | "july": [ 29 | "sú", 30 | "súuyee" 31 | ], 32 | "august": [ 33 | "ut" 34 | ], 35 | "september": [ 36 | "se", 37 | "settembar" 38 | ], 39 | "october": [ 40 | "ok", 41 | "oktobar" 42 | ], 43 | "november": [ 44 | "no", 45 | "novembar" 46 | ], 47 | "december": [ 48 | "de", 49 | "disambar" 50 | ], 51 | "monday": [ 52 | "ten", 53 | "teneŋ" 54 | ], 55 | "tuesday": [ 56 | "tal", 57 | "talata" 58 | ], 59 | "wednesday": [ 60 | "ala", 61 | "alarbay" 62 | ], 63 | "thursday": [ 64 | "ara", 65 | "aramisay" 66 | ], 67 | "friday": [ 68 | "arj", 69 | "arjuma" 70 | ], 71 | "saturday": [ 72 | "sib", 73 | "sibiti" 74 | ], 75 | "sunday": [ 76 | "dim", 77 | "dimas" 78 | ], 79 | "am": [ 80 | "am" 81 | ], 82 | "pm": [ 83 | "pm" 84 | ], 85 | "year": [ 86 | "emit" 87 | ], 88 | "month": [ 89 | "fuleeŋ" 90 | ], 91 | "week": [ 92 | "lóokuŋ" 93 | ], 94 | "day": [ 95 | "funak" 96 | ], 97 | "hour": [ 98 | "hour" 99 | ], 100 | "minute": [ 101 | "minute" 102 | ], 103 | "second": [ 104 | "second" 105 | ], 106 | "relative-type": { 107 | "0 day ago": [ 108 | "jaat" 109 | ], 110 | "0 hour ago": [ 111 | "this hour" 112 | ], 113 | "0 minute ago": [ 114 | "this minute" 115 | ], 116 | "0 month ago": [ 117 | "this month" 118 | ], 119 | "0 second ago": [ 120 | "now" 121 | ], 122 | "0 week ago": [ 123 | "this week" 124 | ], 125 | "0 year ago": [ 126 | "this year" 127 | ], 128 | "1 day ago": [ 129 | "fucen" 130 | ], 131 | "1 month ago": [ 132 | "last month" 133 | ], 134 | "1 week ago": [ 135 | "last week" 136 | ], 137 | "1 year ago": [ 138 | "last year" 139 | ], 140 | "in 1 day": [ 141 | "kajom" 142 | ], 143 | "in 1 month": [ 144 | "next month" 145 | ], 146 | "in 1 week": [ 147 | "next week" 148 | ], 149 | "in 1 year": [ 150 | "next year" 151 | ] 152 | }, 153 | "locale_specific": {} 154 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/haw.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "haw", 3 | "date_order": "DMY", 4 | "january": [ 5 | "ian", 6 | "ianuali" 7 | ], 8 | "february": [ 9 | "pep", 10 | "pepeluali" 11 | ], 12 | "march": [ 13 | "mal", 14 | "malaki" 15 | ], 16 | "april": [ 17 | "'ap", 18 | "'apelila" 19 | ], 20 | "may": [ 21 | "mei" 22 | ], 23 | "june": [ 24 | "iun", 25 | "iune" 26 | ], 27 | "july": [ 28 | "iul", 29 | "iulai" 30 | ], 31 | "august": [ 32 | "'au", 33 | "'aukake" 34 | ], 35 | "september": [ 36 | "kep", 37 | "kepakemapa" 38 | ], 39 | "october": [ 40 | "'ok", 41 | "'okakopa" 42 | ], 43 | "november": [ 44 | "now", 45 | "nowemapa" 46 | ], 47 | "december": [ 48 | "kek", 49 | "kekemapa" 50 | ], 51 | "monday": [ 52 | "p1", 53 | "po'akahi" 54 | ], 55 | "tuesday": [ 56 | "p2", 57 | "po'alua" 58 | ], 59 | "wednesday": [ 60 | "p3", 61 | "po'akolu" 62 | ], 63 | "thursday": [ 64 | "p4", 65 | "po'ahā" 66 | ], 67 | "friday": [ 68 | "p5", 69 | "po'alima" 70 | ], 71 | "saturday": [ 72 | "p6", 73 | "po'aono" 74 | ], 75 | "sunday": [ 76 | "lp", 77 | "lāpule" 78 | ], 79 | "am": [ 80 | "am" 81 | ], 82 | "pm": [ 83 | "pm" 84 | ], 85 | "year": [ 86 | "year" 87 | ], 88 | "month": [ 89 | "month" 90 | ], 91 | "week": [ 92 | "week" 93 | ], 94 | "day": [ 95 | "day" 96 | ], 97 | "hour": [ 98 | "hour" 99 | ], 100 | "minute": [ 101 | "minute" 102 | ], 103 | "second": [ 104 | "second" 105 | ], 106 | "relative-type": { 107 | "0 day ago": [ 108 | "today" 109 | ], 110 | "0 hour ago": [ 111 | "this hour" 112 | ], 113 | "0 minute ago": [ 114 | "this minute" 115 | ], 116 | "0 month ago": [ 117 | "this month" 118 | ], 119 | "0 second ago": [ 120 | "now" 121 | ], 122 | "0 week ago": [ 123 | "this week" 124 | ], 125 | "0 year ago": [ 126 | "this year" 127 | ], 128 | "1 day ago": [ 129 | "yesterday" 130 | ], 131 | "1 month ago": [ 132 | "last month" 133 | ], 134 | "1 week ago": [ 135 | "last week" 136 | ], 137 | "1 year ago": [ 138 | "last year" 139 | ], 140 | "in 1 day": [ 141 | "tomorrow" 142 | ], 143 | "in 1 month": [ 144 | "next month" 145 | ], 146 | "in 1 week": [ 147 | "next week" 148 | ], 149 | "in 1 year": [ 150 | "next year" 151 | ] 152 | }, 153 | "locale_specific": {} 154 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/ig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ig", 3 | "date_order": "DMY", 4 | "january": [ 5 | "jen", 6 | "jenụwarị" 7 | ], 8 | "february": [ 9 | "feb", 10 | "febrụwarị" 11 | ], 12 | "march": [ 13 | "maa", 14 | "maachị" 15 | ], 16 | "april": [ 17 | "epr", 18 | "eprel" 19 | ], 20 | "may": [ 21 | "mee" 22 | ], 23 | "june": [ 24 | "juu", 25 | "juun" 26 | ], 27 | "july": [ 28 | "jul", 29 | "julaị" 30 | ], 31 | "august": [ 32 | "ọgọ", 33 | "ọgọọst" 34 | ], 35 | "september": [ 36 | "sep", 37 | "septemba" 38 | ], 39 | "october": [ 40 | "ọkt", 41 | "ọktoba" 42 | ], 43 | "november": [ 44 | "nov", 45 | "novemba" 46 | ], 47 | "december": [ 48 | "dis", 49 | "disemba" 50 | ], 51 | "monday": [ 52 | "mọn", 53 | "mọnde" 54 | ], 55 | "tuesday": [ 56 | "tiu", 57 | "tiuzdee" 58 | ], 59 | "wednesday": [ 60 | "wen", 61 | "wenezdee" 62 | ], 63 | "thursday": [ 64 | "tọọ", 65 | "tọọzdee" 66 | ], 67 | "friday": [ 68 | "fraị", 69 | "fraịdee" 70 | ], 71 | "saturday": [ 72 | "sat", 73 | "satọdee" 74 | ], 75 | "sunday": [ 76 | "mbọsị ụka", 77 | "ụka" 78 | ], 79 | "am": [ 80 | "am" 81 | ], 82 | "pm": [ 83 | "pm" 84 | ], 85 | "year": [ 86 | "afọ" 87 | ], 88 | "month": [ 89 | "ọnwa" 90 | ], 91 | "week": [ 92 | "izu" 93 | ], 94 | "day": [ 95 | "ụbọchị" 96 | ], 97 | "hour": [ 98 | "elekere" 99 | ], 100 | "minute": [ 101 | "nkeji" 102 | ], 103 | "second": [ 104 | "nkejinta" 105 | ], 106 | "relative-type": { 107 | "0 day ago": [ 108 | "taata" 109 | ], 110 | "0 hour ago": [ 111 | "this hour" 112 | ], 113 | "0 minute ago": [ 114 | "this minute" 115 | ], 116 | "0 month ago": [ 117 | "this month" 118 | ], 119 | "0 second ago": [ 120 | "now" 121 | ], 122 | "0 week ago": [ 123 | "this week" 124 | ], 125 | "0 year ago": [ 126 | "this year" 127 | ], 128 | "1 day ago": [ 129 | "nnyaafụ" 130 | ], 131 | "1 month ago": [ 132 | "last month" 133 | ], 134 | "1 week ago": [ 135 | "last week" 136 | ], 137 | "1 year ago": [ 138 | "last year" 139 | ], 140 | "in 1 day": [ 141 | "echi" 142 | ], 143 | "in 1 month": [ 144 | "next month" 145 | ], 146 | "in 1 week": [ 147 | "next week" 148 | ], 149 | "in 1 year": [ 150 | "next year" 151 | ] 152 | }, 153 | "locale_specific": {} 154 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/ii.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ii", 3 | "date_order": "YMD", 4 | "january": [ 5 | "ꋍꆪ" 6 | ], 7 | "february": [ 8 | "ꑍꆪ" 9 | ], 10 | "march": [ 11 | "ꌕꆪ" 12 | ], 13 | "april": [ 14 | "ꇖꆪ" 15 | ], 16 | "may": [ 17 | "ꉬꆪ" 18 | ], 19 | "june": [ 20 | "ꃘꆪ" 21 | ], 22 | "july": [ 23 | "ꏃꆪ" 24 | ], 25 | "august": [ 26 | "ꉆꆪ" 27 | ], 28 | "september": [ 29 | "ꈬꆪ" 30 | ], 31 | "october": [ 32 | "ꊰꆪ" 33 | ], 34 | "november": [ 35 | "ꊰꊪꆪ" 36 | ], 37 | "december": [ 38 | "ꊰꑋꆪ" 39 | ], 40 | "monday": [ 41 | "ꆏꊂꋍ", 42 | "ꆏꋍ" 43 | ], 44 | "tuesday": [ 45 | "ꆏꊂꑍ", 46 | "ꆏꑍ" 47 | ], 48 | "wednesday": [ 49 | "ꆏꊂꌕ", 50 | "ꆏꌕ" 51 | ], 52 | "thursday": [ 53 | "ꆏꇖ", 54 | "ꆏꊂꇖ" 55 | ], 56 | "friday": [ 57 | "ꆏꉬ", 58 | "ꆏꊂꉬ" 59 | ], 60 | "saturday": [ 61 | "ꆏꃘ", 62 | "ꆏꊂꃘ" 63 | ], 64 | "sunday": [ 65 | "ꑭꆏ", 66 | "ꑭꆏꑍ" 67 | ], 68 | "am": [ 69 | "ꎸꄑ" 70 | ], 71 | "pm": [ 72 | "ꁯꋒ" 73 | ], 74 | "year": [ 75 | "ꈎ" 76 | ], 77 | "month": [ 78 | "ꆪ" 79 | ], 80 | "week": [ 81 | "ꑭꆏ" 82 | ], 83 | "day": [ 84 | "ꑍ" 85 | ], 86 | "hour": [ 87 | "ꄮꈉ" 88 | ], 89 | "minute": [ 90 | "ꃏ" 91 | ], 92 | "second": [ 93 | "ꇙ" 94 | ], 95 | "relative-type": { 96 | "0 day ago": [ 97 | "ꀃꑍ" 98 | ], 99 | "0 hour ago": [ 100 | "this hour" 101 | ], 102 | "0 minute ago": [ 103 | "this minute" 104 | ], 105 | "0 month ago": [ 106 | "this month" 107 | ], 108 | "0 second ago": [ 109 | "now" 110 | ], 111 | "0 week ago": [ 112 | "this week" 113 | ], 114 | "0 year ago": [ 115 | "this year" 116 | ], 117 | "1 day ago": [ 118 | "ꀋꅔꉈ" 119 | ], 120 | "1 month ago": [ 121 | "last month" 122 | ], 123 | "1 week ago": [ 124 | "last week" 125 | ], 126 | "1 year ago": [ 127 | "last year" 128 | ], 129 | "in 1 day": [ 130 | "ꃆꏂꑍ" 131 | ], 132 | "in 1 month": [ 133 | "next month" 134 | ], 135 | "in 1 week": [ 136 | "next week" 137 | ], 138 | "in 1 year": [ 139 | "next year" 140 | ] 141 | }, 142 | "locale_specific": {} 143 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/khq.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "khq", 3 | "date_order": "DMY", 4 | "january": [ 5 | "žan", 6 | "žanwiye" 7 | ], 8 | "february": [ 9 | "fee", 10 | "feewiriye" 11 | ], 12 | "march": [ 13 | "mar", 14 | "marsi" 15 | ], 16 | "april": [ 17 | "awi", 18 | "awiril" 19 | ], 20 | "may": [ 21 | "me" 22 | ], 23 | "june": [ 24 | "žuw", 25 | "žuweŋ" 26 | ], 27 | "july": [ 28 | "žuy", 29 | "žuyye" 30 | ], 31 | "august": [ 32 | "ut" 33 | ], 34 | "september": [ 35 | "sek", 36 | "sektanbur" 37 | ], 38 | "october": [ 39 | "okt", 40 | "oktoobur" 41 | ], 42 | "november": [ 43 | "noo", 44 | "noowanbur" 45 | ], 46 | "december": [ 47 | "dee", 48 | "deesanbur" 49 | ], 50 | "monday": [ 51 | "ati", 52 | "atini" 53 | ], 54 | "tuesday": [ 55 | "ata", 56 | "atalata" 57 | ], 58 | "wednesday": [ 59 | "ala", 60 | "alarba" 61 | ], 62 | "thursday": [ 63 | "alhamiisa", 64 | "alm" 65 | ], 66 | "friday": [ 67 | "alj", 68 | "aljuma" 69 | ], 70 | "saturday": [ 71 | "ass", 72 | "assabdu" 73 | ], 74 | "sunday": [ 75 | "alh", 76 | "alhadi" 77 | ], 78 | "am": [ 79 | "adduha" 80 | ], 81 | "pm": [ 82 | "aluula" 83 | ], 84 | "year": [ 85 | "jiiri" 86 | ], 87 | "month": [ 88 | "handu" 89 | ], 90 | "week": [ 91 | "hebu" 92 | ], 93 | "day": [ 94 | "jaari" 95 | ], 96 | "hour": [ 97 | "guuru" 98 | ], 99 | "minute": [ 100 | "miniti" 101 | ], 102 | "second": [ 103 | "miti" 104 | ], 105 | "relative-type": { 106 | "0 day ago": [ 107 | "hõo" 108 | ], 109 | "0 hour ago": [ 110 | "this hour" 111 | ], 112 | "0 minute ago": [ 113 | "this minute" 114 | ], 115 | "0 month ago": [ 116 | "this month" 117 | ], 118 | "0 second ago": [ 119 | "now" 120 | ], 121 | "0 week ago": [ 122 | "this week" 123 | ], 124 | "0 year ago": [ 125 | "this year" 126 | ], 127 | "1 day ago": [ 128 | "bi" 129 | ], 130 | "1 month ago": [ 131 | "last month" 132 | ], 133 | "1 week ago": [ 134 | "last week" 135 | ], 136 | "1 year ago": [ 137 | "last year" 138 | ], 139 | "in 1 day": [ 140 | "suba" 141 | ], 142 | "in 1 month": [ 143 | "next month" 144 | ], 145 | "in 1 week": [ 146 | "next week" 147 | ], 148 | "in 1 year": [ 149 | "next year" 150 | ] 151 | }, 152 | "locale_specific": {} 153 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/kok.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kok", 3 | "date_order": "YMD", 4 | "january": [ 5 | "जानेवारी" 6 | ], 7 | "february": [ 8 | "फेब्रुवारी" 9 | ], 10 | "march": [ 11 | "मार्च" 12 | ], 13 | "april": [ 14 | "एप्रिल" 15 | ], 16 | "may": [ 17 | "मे" 18 | ], 19 | "june": [ 20 | "जून" 21 | ], 22 | "july": [ 23 | "जुलै" 24 | ], 25 | "august": [ 26 | "ओगस्ट" 27 | ], 28 | "september": [ 29 | "सेप्टेंबर" 30 | ], 31 | "october": [ 32 | "ओक्टोबर" 33 | ], 34 | "november": [ 35 | "नोव्हेंबर" 36 | ], 37 | "december": [ 38 | "डिसेंबर" 39 | ], 40 | "monday": [ 41 | "सोम", 42 | "सोमवार" 43 | ], 44 | "tuesday": [ 45 | "मंगळ", 46 | "मंगळार" 47 | ], 48 | "wednesday": [ 49 | "बुध", 50 | "बुधवार" 51 | ], 52 | "thursday": [ 53 | "गुरु", 54 | "गुरुवार" 55 | ], 56 | "friday": [ 57 | "शुक्र", 58 | "शुक्रवार" 59 | ], 60 | "saturday": [ 61 | "शनि", 62 | "शनिवार" 63 | ], 64 | "sunday": [ 65 | "आदित्यवार", 66 | "रवि" 67 | ], 68 | "am": [ 69 | "मपू" 70 | ], 71 | "pm": [ 72 | "मनं" 73 | ], 74 | "year": [ 75 | "year" 76 | ], 77 | "month": [ 78 | "month" 79 | ], 80 | "week": [ 81 | "week" 82 | ], 83 | "day": [ 84 | "day" 85 | ], 86 | "hour": [ 87 | "hour" 88 | ], 89 | "minute": [ 90 | "minute" 91 | ], 92 | "second": [ 93 | "second" 94 | ], 95 | "relative-type": { 96 | "0 day ago": [ 97 | "today" 98 | ], 99 | "0 hour ago": [ 100 | "this hour" 101 | ], 102 | "0 minute ago": [ 103 | "this minute" 104 | ], 105 | "0 month ago": [ 106 | "this month" 107 | ], 108 | "0 second ago": [ 109 | "now" 110 | ], 111 | "0 week ago": [ 112 | "this week" 113 | ], 114 | "0 year ago": [ 115 | "this year" 116 | ], 117 | "1 day ago": [ 118 | "yesterday" 119 | ], 120 | "1 month ago": [ 121 | "last month" 122 | ], 123 | "1 week ago": [ 124 | "last week" 125 | ], 126 | "1 year ago": [ 127 | "last year" 128 | ], 129 | "in 1 day": [ 130 | "tomorrow" 131 | ], 132 | "in 1 month": [ 133 | "next month" 134 | ], 135 | "in 1 week": [ 136 | "next week" 137 | ], 138 | "in 1 year": [ 139 | "next year" 140 | ] 141 | }, 142 | "locale_specific": {} 143 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/ks.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ks", 3 | "date_order": "MDY", 4 | "january": [ 5 | "جنؤری" 6 | ], 7 | "february": [ 8 | "فرؤری" 9 | ], 10 | "march": [ 11 | "مارٕچ" 12 | ], 13 | "april": [ 14 | "اپریل" 15 | ], 16 | "may": [ 17 | "میٔ" 18 | ], 19 | "june": [ 20 | "جوٗن" 21 | ], 22 | "july": [ 23 | "جوٗلایی" 24 | ], 25 | "august": [ 26 | "اگست" 27 | ], 28 | "september": [ 29 | "ستمبر" 30 | ], 31 | "october": [ 32 | "اکتوٗبر" 33 | ], 34 | "november": [ 35 | "نومبر" 36 | ], 37 | "december": [ 38 | "دسمبر" 39 | ], 40 | "monday": [ 41 | "ژٔنٛدرٕروار", 42 | "ژٔنٛدٕروار" 43 | ], 44 | "tuesday": [ 45 | "بوٚموار" 46 | ], 47 | "wednesday": [ 48 | "بودوار" 49 | ], 50 | "thursday": [ 51 | "برٛٮ۪سوار" 52 | ], 53 | "friday": [ 54 | "جُمہ" 55 | ], 56 | "saturday": [ 57 | "بٹوار" 58 | ], 59 | "sunday": [ 60 | "آتھوار", 61 | "اَتھوار" 62 | ], 63 | "am": [ 64 | "am" 65 | ], 66 | "pm": [ 67 | "pm" 68 | ], 69 | "year": [ 70 | "ؤری" 71 | ], 72 | "month": [ 73 | "رٮ۪تھ" 74 | ], 75 | "week": [ 76 | "ہفتہٕ" 77 | ], 78 | "day": [ 79 | "دۄہ" 80 | ], 81 | "hour": [ 82 | "گٲنٛٹہٕ" 83 | ], 84 | "minute": [ 85 | "مِنَٹ" 86 | ], 87 | "second": [ 88 | "سٮ۪کَنڑ" 89 | ], 90 | "relative-type": { 91 | "0 day ago": [ 92 | "اَز" 93 | ], 94 | "0 hour ago": [ 95 | "this hour" 96 | ], 97 | "0 minute ago": [ 98 | "this minute" 99 | ], 100 | "0 month ago": [ 101 | "this month" 102 | ], 103 | "0 second ago": [ 104 | "now" 105 | ], 106 | "0 week ago": [ 107 | "this week" 108 | ], 109 | "0 year ago": [ 110 | "this year" 111 | ], 112 | "1 day ago": [ 113 | "راتھ" 114 | ], 115 | "1 month ago": [ 116 | "last month" 117 | ], 118 | "1 week ago": [ 119 | "last week" 120 | ], 121 | "1 year ago": [ 122 | "last year" 123 | ], 124 | "in 1 day": [ 125 | "پگاہ" 126 | ], 127 | "in 1 month": [ 128 | "next month" 129 | ], 130 | "in 1 week": [ 131 | "next week" 132 | ], 133 | "in 1 year": [ 134 | "next year" 135 | ] 136 | }, 137 | "locale_specific": {} 138 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/lrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lrc", 3 | "date_order": "YMD", 4 | "january": [ 5 | "جانڤیە" 6 | ], 7 | "february": [ 8 | "فئڤریە" 9 | ], 10 | "march": [ 11 | "مارس" 12 | ], 13 | "april": [ 14 | "آڤریل" 15 | ], 16 | "may": [ 17 | "مئی" 18 | ], 19 | "june": [ 20 | "جوٙأن" 21 | ], 22 | "july": [ 23 | "جوٙلا" 24 | ], 25 | "august": [ 26 | "آگوست" 27 | ], 28 | "september": [ 29 | "سئپتامر" 30 | ], 31 | "october": [ 32 | "ئوکتوڤر" 33 | ], 34 | "november": [ 35 | "نوڤامر" 36 | ], 37 | "december": [ 38 | "دئسامر" 39 | ], 40 | "monday": [ 41 | "mon" 42 | ], 43 | "tuesday": [ 44 | "tue" 45 | ], 46 | "wednesday": [ 47 | "wed" 48 | ], 49 | "thursday": [ 50 | "thu" 51 | ], 52 | "friday": [ 53 | "fri" 54 | ], 55 | "saturday": [ 56 | "sat" 57 | ], 58 | "sunday": [ 59 | "sun" 60 | ], 61 | "am": [ 62 | "am" 63 | ], 64 | "pm": [ 65 | "pm" 66 | ], 67 | "year": [ 68 | "سال" 69 | ], 70 | "month": [ 71 | "ما" 72 | ], 73 | "week": [ 74 | "ھأفتە" 75 | ], 76 | "day": [ 77 | "روٙز" 78 | ], 79 | "hour": [ 80 | "ساأت" 81 | ], 82 | "minute": [ 83 | "دئیقە" 84 | ], 85 | "second": [ 86 | "ثانیە" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "أمروٙ" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "دیروٙز" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "شوٙصوٙ" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": { 136 | "lrc-IQ": { 137 | "name": "lrc-IQ" 138 | } 139 | } 140 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/mer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mer", 3 | "date_order": "DMY", 4 | "january": [ 5 | "jan", 6 | "januarĩ" 7 | ], 8 | "february": [ 9 | "feb", 10 | "feburuarĩ" 11 | ], 12 | "march": [ 13 | "mac", 14 | "machi" 15 | ], 16 | "april": [ 17 | "ĩpu", 18 | "ĩpurũ" 19 | ], 20 | "may": [ 21 | "mĩĩ" 22 | ], 23 | "june": [ 24 | "nju", 25 | "njuni" 26 | ], 27 | "july": [ 28 | "njr", 29 | "njuraĩ" 30 | ], 31 | "august": [ 32 | "aga", 33 | "agasti" 34 | ], 35 | "september": [ 36 | "septemba", 37 | "spt" 38 | ], 39 | "october": [ 40 | "okt", 41 | "oktũba" 42 | ], 43 | "november": [ 44 | "nov", 45 | "novemba" 46 | ], 47 | "december": [ 48 | "dec", 49 | "dicemba" 50 | ], 51 | "monday": [ 52 | "mra", 53 | "muramuko" 54 | ], 55 | "tuesday": [ 56 | "wai", 57 | "wairi" 58 | ], 59 | "wednesday": [ 60 | "wet", 61 | "wethatu" 62 | ], 63 | "thursday": [ 64 | "wen", 65 | "wena" 66 | ], 67 | "friday": [ 68 | "wetano", 69 | "wtn" 70 | ], 71 | "saturday": [ 72 | "jum", 73 | "jumamosi" 74 | ], 75 | "sunday": [ 76 | "kiu", 77 | "kiumia" 78 | ], 79 | "am": [ 80 | "rũ" 81 | ], 82 | "pm": [ 83 | "ũg" 84 | ], 85 | "year": [ 86 | "mwaka" 87 | ], 88 | "month": [ 89 | "mweri" 90 | ], 91 | "week": [ 92 | "kiumia" 93 | ], 94 | "day": [ 95 | "ntukũ" 96 | ], 97 | "hour": [ 98 | "ĩthaa" 99 | ], 100 | "minute": [ 101 | "ndagika" 102 | ], 103 | "second": [ 104 | "sekondi" 105 | ], 106 | "relative-type": { 107 | "0 day ago": [ 108 | "narua" 109 | ], 110 | "0 hour ago": [ 111 | "this hour" 112 | ], 113 | "0 minute ago": [ 114 | "this minute" 115 | ], 116 | "0 month ago": [ 117 | "this month" 118 | ], 119 | "0 second ago": [ 120 | "now" 121 | ], 122 | "0 week ago": [ 123 | "this week" 124 | ], 125 | "0 year ago": [ 126 | "this year" 127 | ], 128 | "1 day ago": [ 129 | "ĩgoro" 130 | ], 131 | "1 month ago": [ 132 | "last month" 133 | ], 134 | "1 week ago": [ 135 | "last week" 136 | ], 137 | "1 year ago": [ 138 | "last year" 139 | ], 140 | "in 1 day": [ 141 | "rũjũ" 142 | ], 143 | "in 1 month": [ 144 | "next month" 145 | ], 146 | "in 1 week": [ 147 | "next week" 148 | ], 149 | "in 1 year": [ 150 | "next year" 151 | ] 152 | }, 153 | "locale_specific": {} 154 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/mfe.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mfe", 3 | "date_order": "DMY", 4 | "january": [ 5 | "zan", 6 | "zanvie" 7 | ], 8 | "february": [ 9 | "fev", 10 | "fevriye" 11 | ], 12 | "march": [ 13 | "mar", 14 | "mars" 15 | ], 16 | "april": [ 17 | "avr", 18 | "avril" 19 | ], 20 | "may": [ 21 | "me" 22 | ], 23 | "june": [ 24 | "zin" 25 | ], 26 | "july": [ 27 | "zil", 28 | "zilye" 29 | ], 30 | "august": [ 31 | "out" 32 | ], 33 | "september": [ 34 | "sep", 35 | "septam" 36 | ], 37 | "october": [ 38 | "okt", 39 | "oktob" 40 | ], 41 | "november": [ 42 | "nov", 43 | "novam" 44 | ], 45 | "december": [ 46 | "des", 47 | "desam" 48 | ], 49 | "monday": [ 50 | "lin", 51 | "lindi" 52 | ], 53 | "tuesday": [ 54 | "mar", 55 | "mardi" 56 | ], 57 | "wednesday": [ 58 | "mer", 59 | "merkredi" 60 | ], 61 | "thursday": [ 62 | "ze", 63 | "zedi" 64 | ], 65 | "friday": [ 66 | "van", 67 | "vandredi" 68 | ], 69 | "saturday": [ 70 | "sam", 71 | "samdi" 72 | ], 73 | "sunday": [ 74 | "dim", 75 | "dimans" 76 | ], 77 | "am": [ 78 | "am" 79 | ], 80 | "pm": [ 81 | "pm" 82 | ], 83 | "year": [ 84 | "lane" 85 | ], 86 | "month": [ 87 | "mwa" 88 | ], 89 | "week": [ 90 | "semenn" 91 | ], 92 | "day": [ 93 | "zour" 94 | ], 95 | "hour": [ 96 | "ler" 97 | ], 98 | "minute": [ 99 | "minit" 100 | ], 101 | "second": [ 102 | "segonn" 103 | ], 104 | "relative-type": { 105 | "0 day ago": [ 106 | "zordi" 107 | ], 108 | "0 hour ago": [ 109 | "this hour" 110 | ], 111 | "0 minute ago": [ 112 | "this minute" 113 | ], 114 | "0 month ago": [ 115 | "this month" 116 | ], 117 | "0 second ago": [ 118 | "now" 119 | ], 120 | "0 week ago": [ 121 | "this week" 122 | ], 123 | "0 year ago": [ 124 | "this year" 125 | ], 126 | "1 day ago": [ 127 | "yer" 128 | ], 129 | "1 month ago": [ 130 | "last month" 131 | ], 132 | "1 week ago": [ 133 | "last week" 134 | ], 135 | "1 year ago": [ 136 | "last year" 137 | ], 138 | "in 1 day": [ 139 | "demin" 140 | ], 141 | "in 1 month": [ 142 | "next month" 143 | ], 144 | "in 1 week": [ 145 | "next week" 146 | ], 147 | "in 1 year": [ 148 | "next year" 149 | ] 150 | }, 151 | "locale_specific": {} 152 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/mgo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mgo", 3 | "date_order": "YMD", 4 | "january": [ 5 | "iməg mbegtug", 6 | "mbegtug" 7 | ], 8 | "february": [ 9 | "imeg àbùbì" 10 | ], 11 | "march": [ 12 | "imeg mbəŋchubi" 13 | ], 14 | "april": [ 15 | "iməg ngwə̀t" 16 | ], 17 | "may": [ 18 | "iməg fog" 19 | ], 20 | "june": [ 21 | "iməg ichiibɔd" 22 | ], 23 | "july": [ 24 | "iməg àdùmbə̀ŋ" 25 | ], 26 | "august": [ 27 | "iməg ichika" 28 | ], 29 | "september": [ 30 | "iməg kud" 31 | ], 32 | "october": [ 33 | "iməg tèsi'e" 34 | ], 35 | "november": [ 36 | "iməg zò" 37 | ], 38 | "december": [ 39 | "iməg krizmed" 40 | ], 41 | "monday": [ 42 | "aneg 2" 43 | ], 44 | "tuesday": [ 45 | "aneg 3" 46 | ], 47 | "wednesday": [ 48 | "aneg 4" 49 | ], 50 | "thursday": [ 51 | "aneg 5" 52 | ], 53 | "friday": [ 54 | "aneg 6" 55 | ], 56 | "saturday": [ 57 | "aneg 7" 58 | ], 59 | "sunday": [ 60 | "aneg 1" 61 | ], 62 | "am": [ 63 | "am" 64 | ], 65 | "pm": [ 66 | "pm" 67 | ], 68 | "year": [ 69 | "fitu'" 70 | ], 71 | "month": [ 72 | "iməg" 73 | ], 74 | "week": [ 75 | "nkap" 76 | ], 77 | "day": [ 78 | "anəg" 79 | ], 80 | "hour": [ 81 | "hour" 82 | ], 83 | "minute": [ 84 | "minute" 85 | ], 86 | "second": [ 87 | "second" 88 | ], 89 | "relative-type": { 90 | "0 day ago": [ 91 | "tèchɔ̀ŋ" 92 | ], 93 | "0 hour ago": [ 94 | "this hour" 95 | ], 96 | "0 minute ago": [ 97 | "this minute" 98 | ], 99 | "0 month ago": [ 100 | "this month" 101 | ], 102 | "0 second ago": [ 103 | "now" 104 | ], 105 | "0 week ago": [ 106 | "this week" 107 | ], 108 | "0 year ago": [ 109 | "this year" 110 | ], 111 | "1 day ago": [ 112 | "ikwiri" 113 | ], 114 | "1 month ago": [ 115 | "last month" 116 | ], 117 | "1 week ago": [ 118 | "last week" 119 | ], 120 | "1 year ago": [ 121 | "last year" 122 | ], 123 | "in 1 day": [ 124 | "isu" 125 | ], 126 | "in 1 month": [ 127 | "next month" 128 | ], 129 | "in 1 week": [ 130 | "next week" 131 | ], 132 | "in 1 year": [ 133 | "next year" 134 | ] 135 | }, 136 | "locale_specific": {} 137 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/nnh.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nnh", 3 | "date_order": "DMY", 4 | "january": [ 5 | "saŋ tsetsɛ̀ɛ lùm" 6 | ], 7 | "february": [ 8 | "saŋ kàg ngwóŋ" 9 | ], 10 | "march": [ 11 | "saŋ lepyè shúm" 12 | ], 13 | "april": [ 14 | "saŋ cÿó" 15 | ], 16 | "may": [ 17 | "saŋ tsɛ̀ɛ cÿó" 18 | ], 19 | "june": [ 20 | "saŋ njÿolá'" 21 | ], 22 | "july": [ 23 | "saŋ tyɛ̀b tyɛ̀b mbʉ̀ŋ" 24 | ], 25 | "august": [ 26 | "saŋ mbʉ̀ŋ" 27 | ], 28 | "september": [ 29 | "saŋ ngwɔ̀' mbÿɛ" 30 | ], 31 | "october": [ 32 | "saŋ tàŋa tsetsá'" 33 | ], 34 | "november": [ 35 | "saŋ mejwoŋó" 36 | ], 37 | "december": [ 38 | "saŋ lùm" 39 | ], 40 | "monday": [ 41 | "mvfò lyɛ̌'" 42 | ], 43 | "tuesday": [ 44 | "mbɔ́ɔntè mvfò lyɛ̌'" 45 | ], 46 | "wednesday": [ 47 | "tsètsɛ̀ɛ lyɛ̌'" 48 | ], 49 | "thursday": [ 50 | "mbɔ́ɔntè tsetsɛ̀ɛ lyɛ̌'" 51 | ], 52 | "friday": [ 53 | "mvfò màga lyɛ̌'" 54 | ], 55 | "saturday": [ 56 | "màga lyɛ̌'" 57 | ], 58 | "sunday": [ 59 | "lyɛ'ɛ́ sẅíŋtè" 60 | ], 61 | "am": [ 62 | "mba'ámba'" 63 | ], 64 | "pm": [ 65 | "ncwònzém" 66 | ], 67 | "year": [ 68 | "ngù'" 69 | ], 70 | "month": [ 71 | "month" 72 | ], 73 | "week": [ 74 | "week" 75 | ], 76 | "day": [ 77 | "lyɛ̌'" 78 | ], 79 | "hour": [ 80 | "fʉ̀' nèm" 81 | ], 82 | "minute": [ 83 | "minute" 84 | ], 85 | "second": [ 86 | "second" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "lyɛ̌'ɔɔn" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "jǔɔ gẅie à ka tɔ̌g" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "jǔɔ gẅie à ne ntóo" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": {} 136 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/nus.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nus", 3 | "date_order": "DMY", 4 | "january": [ 5 | "tiop", 6 | "tiop thar pɛt" 7 | ], 8 | "february": [ 9 | "pɛt" 10 | ], 11 | "march": [ 12 | "duɔ̱ɔ̱", 13 | "duɔ̱ɔ̱ŋ" 14 | ], 15 | "april": [ 16 | "guak" 17 | ], 18 | "may": [ 19 | "duä", 20 | "duät" 21 | ], 22 | "june": [ 23 | "kor", 24 | "kornyoot" 25 | ], 26 | "july": [ 27 | "pay", 28 | "pay yie̱tni" 29 | ], 30 | "august": [ 31 | "thoo", 32 | "tho̱o̱r" 33 | ], 34 | "september": [ 35 | "tɛɛ", 36 | "tɛɛr" 37 | ], 38 | "october": [ 39 | "laa", 40 | "laath" 41 | ], 42 | "november": [ 43 | "kur" 44 | ], 45 | "december": [ 46 | "tid", 47 | "tio̱p in di̱i̱t" 48 | ], 49 | "monday": [ 50 | "jiec", 51 | "jiec la̱t" 52 | ], 53 | "tuesday": [ 54 | "rɛw", 55 | "rɛw lätni" 56 | ], 57 | "wednesday": [ 58 | "diɔ̱k", 59 | "diɔ̱k lätni" 60 | ], 61 | "thursday": [ 62 | "ŋuaan", 63 | "ŋuaan lätni" 64 | ], 65 | "friday": [ 66 | "dhieec", 67 | "dhieec lätni" 68 | ], 69 | "saturday": [ 70 | "bäkɛl", 71 | "bäkɛl lätni" 72 | ], 73 | "sunday": [ 74 | "cäŋ", 75 | "cäŋ kuɔth" 76 | ], 77 | "am": [ 78 | "rw" 79 | ], 80 | "pm": [ 81 | "tŋ" 82 | ], 83 | "year": [ 84 | "ruɔ̱n" 85 | ], 86 | "month": [ 87 | "pay" 88 | ], 89 | "week": [ 90 | "jiɔk" 91 | ], 92 | "day": [ 93 | "cäŋ" 94 | ], 95 | "hour": [ 96 | "thaak" 97 | ], 98 | "minute": [ 99 | "minit" 100 | ], 101 | "second": [ 102 | "thɛkɛni" 103 | ], 104 | "relative-type": { 105 | "0 day ago": [ 106 | "walɛ" 107 | ], 108 | "0 hour ago": [ 109 | "this hour" 110 | ], 111 | "0 minute ago": [ 112 | "this minute" 113 | ], 114 | "0 month ago": [ 115 | "this month" 116 | ], 117 | "0 second ago": [ 118 | "now" 119 | ], 120 | "0 week ago": [ 121 | "this week" 122 | ], 123 | "0 year ago": [ 124 | "this year" 125 | ], 126 | "1 day ago": [ 127 | "pan" 128 | ], 129 | "1 month ago": [ 130 | "last month" 131 | ], 132 | "1 week ago": [ 133 | "last week" 134 | ], 135 | "1 year ago": [ 136 | "last year" 137 | ], 138 | "in 1 day": [ 139 | "ruun" 140 | ], 141 | "in 1 month": [ 142 | "next month" 143 | ], 144 | "in 1 week": [ 145 | "next week" 146 | ], 147 | "in 1 year": [ 148 | "next year" 149 | ] 150 | }, 151 | "locale_specific": {} 152 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/or.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "or", 3 | "date_order": "DMY", 4 | "january": [ 5 | "ଜାନୁଆରୀ" 6 | ], 7 | "february": [ 8 | "ଫେବୃଆରୀ" 9 | ], 10 | "march": [ 11 | "ମାର୍ଚ୍ଚ" 12 | ], 13 | "april": [ 14 | "ଅପ୍ରେଲ" 15 | ], 16 | "may": [ 17 | "ମଇ" 18 | ], 19 | "june": [ 20 | "ଜୁନ" 21 | ], 22 | "july": [ 23 | "ଜୁଲାଇ" 24 | ], 25 | "august": [ 26 | "ଅଗଷ୍ଟ" 27 | ], 28 | "september": [ 29 | "ସେପ୍ଟେମ୍ବର" 30 | ], 31 | "october": [ 32 | "ଅକ୍ଟୋବର" 33 | ], 34 | "november": [ 35 | "ନଭେମ୍ବର" 36 | ], 37 | "december": [ 38 | "ଡିସେମ୍ବର" 39 | ], 40 | "monday": [ 41 | "ସୋମ", 42 | "ସୋମବାର" 43 | ], 44 | "tuesday": [ 45 | "ମଙ୍ଗଳ", 46 | "ମଙ୍ଗଳବାର" 47 | ], 48 | "wednesday": [ 49 | "ବୁଧ", 50 | "ବୁଧବାର" 51 | ], 52 | "thursday": [ 53 | "ଗୁରୁ", 54 | "ଗୁରୁବାର" 55 | ], 56 | "friday": [ 57 | "ଶୁକ୍ର", 58 | "ଶୁକ୍ରବାର" 59 | ], 60 | "saturday": [ 61 | "ଶନି", 62 | "ଶନିବାର" 63 | ], 64 | "sunday": [ 65 | "ରବି", 66 | "ରବିବାର" 67 | ], 68 | "am": [ 69 | "am" 70 | ], 71 | "pm": [ 72 | "pm" 73 | ], 74 | "year": [ 75 | "year" 76 | ], 77 | "month": [ 78 | "month" 79 | ], 80 | "week": [ 81 | "week" 82 | ], 83 | "day": [ 84 | "day" 85 | ], 86 | "hour": [ 87 | "hour" 88 | ], 89 | "minute": [ 90 | "minute" 91 | ], 92 | "second": [ 93 | "second" 94 | ], 95 | "relative-type": { 96 | "0 day ago": [ 97 | "today" 98 | ], 99 | "0 hour ago": [ 100 | "this hour" 101 | ], 102 | "0 minute ago": [ 103 | "this minute" 104 | ], 105 | "0 month ago": [ 106 | "this month" 107 | ], 108 | "0 second ago": [ 109 | "now" 110 | ], 111 | "0 week ago": [ 112 | "this week" 113 | ], 114 | "0 year ago": [ 115 | "this year" 116 | ], 117 | "1 day ago": [ 118 | "yesterday" 119 | ], 120 | "1 month ago": [ 121 | "last month" 122 | ], 123 | "1 week ago": [ 124 | "last week" 125 | ], 126 | "1 year ago": [ 127 | "last year" 128 | ], 129 | "in 1 day": [ 130 | "tomorrow" 131 | ], 132 | "in 1 month": [ 133 | "next month" 134 | ], 135 | "in 1 week": [ 136 | "next week" 137 | ], 138 | "in 1 year": [ 139 | "next year" 140 | ] 141 | }, 142 | "locale_specific": {} 143 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/pa-Arab.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pa-Arab", 3 | "date_order": "DMY", 4 | "january": [ 5 | "جنوری" 6 | ], 7 | "february": [ 8 | "فروری" 9 | ], 10 | "march": [ 11 | "مارچ" 12 | ], 13 | "april": [ 14 | "اپریل" 15 | ], 16 | "may": [ 17 | "مئ" 18 | ], 19 | "june": [ 20 | "جون" 21 | ], 22 | "july": [ 23 | "جولائی" 24 | ], 25 | "august": [ 26 | "اگست" 27 | ], 28 | "september": [ 29 | "ستمبر" 30 | ], 31 | "october": [ 32 | "اکتوبر" 33 | ], 34 | "november": [ 35 | "نومبر" 36 | ], 37 | "december": [ 38 | "دسمبر" 39 | ], 40 | "monday": [ 41 | "پیر" 42 | ], 43 | "tuesday": [ 44 | "منگل" 45 | ], 46 | "wednesday": [ 47 | "بُدھ" 48 | ], 49 | "thursday": [ 50 | "جمعرات" 51 | ], 52 | "friday": [ 53 | "جمعہ" 54 | ], 55 | "saturday": [ 56 | "ہفتہ" 57 | ], 58 | "sunday": [ 59 | "اتوار" 60 | ], 61 | "am": [ 62 | "am" 63 | ], 64 | "pm": [ 65 | "pm" 66 | ], 67 | "year": [ 68 | "ورھا" 69 | ], 70 | "month": [ 71 | "مہينا" 72 | ], 73 | "week": [ 74 | "ہفتہ" 75 | ], 76 | "day": [ 77 | "دئن" 78 | ], 79 | "hour": [ 80 | "گھنٹا" 81 | ], 82 | "minute": [ 83 | "منٹ" 84 | ], 85 | "second": [ 86 | "second" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "today" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "yesterday" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "tomorrow" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": {} 136 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/ps.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ps", 3 | "date_order": "YMD", 4 | "january": [ 5 | "جنوري" 6 | ], 7 | "february": [ 8 | "فبروري" 9 | ], 10 | "march": [ 11 | "مارچ" 12 | ], 13 | "april": [ 14 | "اپریل" 15 | ], 16 | "may": [ 17 | "مۍ" 18 | ], 19 | "june": [ 20 | "جون" 21 | ], 22 | "july": [ 23 | "جولای" 24 | ], 25 | "august": [ 26 | "اګست" 27 | ], 28 | "september": [ 29 | "سپتمبر" 30 | ], 31 | "october": [ 32 | "اکتوبر" 33 | ], 34 | "november": [ 35 | "نومبر" 36 | ], 37 | "december": [ 38 | "دسمبر" 39 | ], 40 | "monday": [ 41 | "دوشنبه" 42 | ], 43 | "tuesday": [ 44 | "سه‌شنبه" 45 | ], 46 | "wednesday": [ 47 | "چهارشنبه" 48 | ], 49 | "thursday": [ 50 | "پنجشنبه" 51 | ], 52 | "friday": [ 53 | "جمعه" 54 | ], 55 | "saturday": [ 56 | "شنبه" 57 | ], 58 | "sunday": [ 59 | "یکشنبه" 60 | ], 61 | "am": [ 62 | "غم" 63 | ], 64 | "pm": [ 65 | "غو" 66 | ], 67 | "year": [ 68 | "year" 69 | ], 70 | "month": [ 71 | "month" 72 | ], 73 | "week": [ 74 | "week" 75 | ], 76 | "day": [ 77 | "day" 78 | ], 79 | "hour": [ 80 | "hour" 81 | ], 82 | "minute": [ 83 | "minute" 84 | ], 85 | "second": [ 86 | "second" 87 | ], 88 | "relative-type": { 89 | "0 day ago": [ 90 | "today" 91 | ], 92 | "0 hour ago": [ 93 | "this hour" 94 | ], 95 | "0 minute ago": [ 96 | "this minute" 97 | ], 98 | "0 month ago": [ 99 | "this month" 100 | ], 101 | "0 second ago": [ 102 | "now" 103 | ], 104 | "0 week ago": [ 105 | "this week" 106 | ], 107 | "0 year ago": [ 108 | "this year" 109 | ], 110 | "1 day ago": [ 111 | "yesterday" 112 | ], 113 | "1 month ago": [ 114 | "last month" 115 | ], 116 | "1 week ago": [ 117 | "last week" 118 | ], 119 | "1 year ago": [ 120 | "last year" 121 | ], 122 | "in 1 day": [ 123 | "tomorrow" 124 | ], 125 | "in 1 month": [ 126 | "next month" 127 | ], 128 | "in 1 week": [ 129 | "next week" 130 | ], 131 | "in 1 year": [ 132 | "next year" 133 | ] 134 | }, 135 | "locale_specific": {} 136 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/rm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rm", 3 | "date_order": "DMY", 4 | "january": [ 5 | "schan", 6 | "schaner" 7 | ], 8 | "february": [ 9 | "favr", 10 | "favrer" 11 | ], 12 | "march": [ 13 | "mars" 14 | ], 15 | "april": [ 16 | "avr", 17 | "avrigl" 18 | ], 19 | "may": [ 20 | "matg" 21 | ], 22 | "june": [ 23 | "zercl", 24 | "zercladur" 25 | ], 26 | "july": [ 27 | "fan", 28 | "fanadur" 29 | ], 30 | "august": [ 31 | "avust" 32 | ], 33 | "september": [ 34 | "sett", 35 | "settember" 36 | ], 37 | "october": [ 38 | "oct", 39 | "october" 40 | ], 41 | "november": [ 42 | "nov", 43 | "november" 44 | ], 45 | "december": [ 46 | "dec", 47 | "december" 48 | ], 49 | "monday": [ 50 | "gli", 51 | "glindesdi" 52 | ], 53 | "tuesday": [ 54 | "ma", 55 | "mardi" 56 | ], 57 | "wednesday": [ 58 | "me", 59 | "mesemna" 60 | ], 61 | "thursday": [ 62 | "gie", 63 | "gievgia" 64 | ], 65 | "friday": [ 66 | "ve", 67 | "venderdi" 68 | ], 69 | "saturday": [ 70 | "so", 71 | "sonda" 72 | ], 73 | "sunday": [ 74 | "du", 75 | "dumengia" 76 | ], 77 | "am": [ 78 | "am" 79 | ], 80 | "pm": [ 81 | "pm" 82 | ], 83 | "year": [ 84 | "onn" 85 | ], 86 | "month": [ 87 | "mais" 88 | ], 89 | "week": [ 90 | "emna" 91 | ], 92 | "day": [ 93 | "tag" 94 | ], 95 | "hour": [ 96 | "ura" 97 | ], 98 | "minute": [ 99 | "minuta" 100 | ], 101 | "second": [ 102 | "secunda" 103 | ], 104 | "relative-type": { 105 | "0 day ago": [ 106 | "oz" 107 | ], 108 | "0 hour ago": [ 109 | "this hour" 110 | ], 111 | "0 minute ago": [ 112 | "this minute" 113 | ], 114 | "0 month ago": [ 115 | "this month" 116 | ], 117 | "0 second ago": [ 118 | "now" 119 | ], 120 | "0 week ago": [ 121 | "this week" 122 | ], 123 | "0 year ago": [ 124 | "this year" 125 | ], 126 | "1 day ago": [ 127 | "ier" 128 | ], 129 | "1 month ago": [ 130 | "last month" 131 | ], 132 | "1 week ago": [ 133 | "last week" 134 | ], 135 | "1 year ago": [ 136 | "last year" 137 | ], 138 | "in 1 day": [ 139 | "damaun" 140 | ], 141 | "in 1 month": [ 142 | "next month" 143 | ], 144 | "in 1 week": [ 145 | "next week" 146 | ], 147 | "in 1 year": [ 148 | "next year" 149 | ] 150 | }, 151 | "locale_specific": {} 152 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/rof.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rof", 3 | "date_order": "DMY", 4 | "january": [ 5 | "mweri wa kwanza" 6 | ], 7 | "february": [ 8 | "mweri wa kaili" 9 | ], 10 | "march": [ 11 | "mweri wa katatu" 12 | ], 13 | "april": [ 14 | "mweri wa kaana" 15 | ], 16 | "may": [ 17 | "mweri wa tanu" 18 | ], 19 | "june": [ 20 | "mweri wa sita" 21 | ], 22 | "july": [ 23 | "mweri wa saba" 24 | ], 25 | "august": [ 26 | "mweri wa nane" 27 | ], 28 | "september": [ 29 | "mweri wa tisa" 30 | ], 31 | "october": [ 32 | "mweri wa ikumi" 33 | ], 34 | "november": [ 35 | "mweri wa ikumi na moja" 36 | ], 37 | "december": [ 38 | "mweri wa ikumi na mbili" 39 | ], 40 | "monday": [ 41 | "ijt", 42 | "ijumatatu" 43 | ], 44 | "tuesday": [ 45 | "ijn", 46 | "ijumanne" 47 | ], 48 | "wednesday": [ 49 | "ijtn", 50 | "ijumatano" 51 | ], 52 | "thursday": [ 53 | "alh", 54 | "alhamisi" 55 | ], 56 | "friday": [ 57 | "iju", 58 | "ijumaa" 59 | ], 60 | "saturday": [ 61 | "ijm", 62 | "ijumamosi" 63 | ], 64 | "sunday": [ 65 | "ijp", 66 | "ijumapili" 67 | ], 68 | "am": [ 69 | "kang'ama" 70 | ], 71 | "pm": [ 72 | "kingoto" 73 | ], 74 | "year": [ 75 | "muaka" 76 | ], 77 | "month": [ 78 | "mweri" 79 | ], 80 | "week": [ 81 | "iwiki" 82 | ], 83 | "day": [ 84 | "mfiri" 85 | ], 86 | "hour": [ 87 | "isaa" 88 | ], 89 | "minute": [ 90 | "dakika" 91 | ], 92 | "second": [ 93 | "sekunde" 94 | ], 95 | "relative-type": { 96 | "0 day ago": [ 97 | "linu" 98 | ], 99 | "0 hour ago": [ 100 | "this hour" 101 | ], 102 | "0 minute ago": [ 103 | "this minute" 104 | ], 105 | "0 month ago": [ 106 | "this month" 107 | ], 108 | "0 second ago": [ 109 | "now" 110 | ], 111 | "0 week ago": [ 112 | "this week" 113 | ], 114 | "0 year ago": [ 115 | "this year" 116 | ], 117 | "1 day ago": [ 118 | "hiyo" 119 | ], 120 | "1 month ago": [ 121 | "last month" 122 | ], 123 | "1 week ago": [ 124 | "last week" 125 | ], 126 | "1 year ago": [ 127 | "last year" 128 | ], 129 | "in 1 day": [ 130 | "ng'ama" 131 | ], 132 | "in 1 month": [ 133 | "next month" 134 | ], 135 | "in 1 week": [ 136 | "next week" 137 | ], 138 | "in 1 year": [ 139 | "next year" 140 | ] 141 | }, 142 | "locale_specific": {} 143 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/ses.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ses", 3 | "date_order": "DMY", 4 | "january": [ 5 | "žan", 6 | "žanwiye" 7 | ], 8 | "february": [ 9 | "fee", 10 | "feewiriye" 11 | ], 12 | "march": [ 13 | "mar", 14 | "marsi" 15 | ], 16 | "april": [ 17 | "awi", 18 | "awiril" 19 | ], 20 | "may": [ 21 | "me" 22 | ], 23 | "june": [ 24 | "žuw", 25 | "žuweŋ" 26 | ], 27 | "july": [ 28 | "žuy", 29 | "žuyye" 30 | ], 31 | "august": [ 32 | "ut" 33 | ], 34 | "september": [ 35 | "sek", 36 | "sektanbur" 37 | ], 38 | "october": [ 39 | "okt", 40 | "oktoobur" 41 | ], 42 | "november": [ 43 | "noo", 44 | "noowanbur" 45 | ], 46 | "december": [ 47 | "dee", 48 | "deesanbur" 49 | ], 50 | "monday": [ 51 | "ati", 52 | "atinni" 53 | ], 54 | "tuesday": [ 55 | "ata", 56 | "atalaata" 57 | ], 58 | "wednesday": [ 59 | "ala", 60 | "alarba" 61 | ], 62 | "thursday": [ 63 | "alhamiisa", 64 | "alm" 65 | ], 66 | "friday": [ 67 | "alz", 68 | "alzuma" 69 | ], 70 | "saturday": [ 71 | "asi", 72 | "asibti" 73 | ], 74 | "sunday": [ 75 | "alh", 76 | "alhadi" 77 | ], 78 | "am": [ 79 | "adduha" 80 | ], 81 | "pm": [ 82 | "aluula" 83 | ], 84 | "year": [ 85 | "jiiri" 86 | ], 87 | "month": [ 88 | "handu" 89 | ], 90 | "week": [ 91 | "hebu" 92 | ], 93 | "day": [ 94 | "zaari" 95 | ], 96 | "hour": [ 97 | "guuru" 98 | ], 99 | "minute": [ 100 | "miniti" 101 | ], 102 | "second": [ 103 | "miti" 104 | ], 105 | "relative-type": { 106 | "0 day ago": [ 107 | "hõo" 108 | ], 109 | "0 hour ago": [ 110 | "this hour" 111 | ], 112 | "0 minute ago": [ 113 | "this minute" 114 | ], 115 | "0 month ago": [ 116 | "this month" 117 | ], 118 | "0 second ago": [ 119 | "now" 120 | ], 121 | "0 week ago": [ 122 | "this week" 123 | ], 124 | "0 year ago": [ 125 | "this year" 126 | ], 127 | "1 day ago": [ 128 | "bi" 129 | ], 130 | "1 month ago": [ 131 | "last month" 132 | ], 133 | "1 week ago": [ 134 | "last week" 135 | ], 136 | "1 year ago": [ 137 | "last year" 138 | ], 139 | "in 1 day": [ 140 | "suba" 141 | ], 142 | "in 1 month": [ 143 | "next month" 144 | ], 145 | "in 1 week": [ 146 | "next week" 147 | ], 148 | "in 1 year": [ 149 | "next year" 150 | ] 151 | }, 152 | "locale_specific": {} 153 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/twq.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twq", 3 | "date_order": "DMY", 4 | "january": [ 5 | "žan", 6 | "žanwiye" 7 | ], 8 | "february": [ 9 | "fee", 10 | "feewiriye" 11 | ], 12 | "march": [ 13 | "mar", 14 | "marsi" 15 | ], 16 | "april": [ 17 | "awi", 18 | "awiril" 19 | ], 20 | "may": [ 21 | "me" 22 | ], 23 | "june": [ 24 | "žuw", 25 | "žuweŋ" 26 | ], 27 | "july": [ 28 | "žuy", 29 | "žuyye" 30 | ], 31 | "august": [ 32 | "ut" 33 | ], 34 | "september": [ 35 | "sek", 36 | "sektanbur" 37 | ], 38 | "october": [ 39 | "okt", 40 | "oktoobur" 41 | ], 42 | "november": [ 43 | "noo", 44 | "noowanbur" 45 | ], 46 | "december": [ 47 | "dee", 48 | "deesanbur" 49 | ], 50 | "monday": [ 51 | "ati", 52 | "atinni" 53 | ], 54 | "tuesday": [ 55 | "ata", 56 | "atalaata" 57 | ], 58 | "wednesday": [ 59 | "ala", 60 | "alarba" 61 | ], 62 | "thursday": [ 63 | "alhamiisa", 64 | "alm" 65 | ], 66 | "friday": [ 67 | "alz", 68 | "alzuma" 69 | ], 70 | "saturday": [ 71 | "asi", 72 | "asibti" 73 | ], 74 | "sunday": [ 75 | "alh", 76 | "alhadi" 77 | ], 78 | "am": [ 79 | "subbaahi" 80 | ], 81 | "pm": [ 82 | "zaarikay b" 83 | ], 84 | "year": [ 85 | "jiiri" 86 | ], 87 | "month": [ 88 | "handu" 89 | ], 90 | "week": [ 91 | "hebu" 92 | ], 93 | "day": [ 94 | "zaari" 95 | ], 96 | "hour": [ 97 | "guuru" 98 | ], 99 | "minute": [ 100 | "miniti" 101 | ], 102 | "second": [ 103 | "miti" 104 | ], 105 | "relative-type": { 106 | "0 day ago": [ 107 | "hõo" 108 | ], 109 | "0 hour ago": [ 110 | "this hour" 111 | ], 112 | "0 minute ago": [ 113 | "this minute" 114 | ], 115 | "0 month ago": [ 116 | "this month" 117 | ], 118 | "0 second ago": [ 119 | "now" 120 | ], 121 | "0 week ago": [ 122 | "this week" 123 | ], 124 | "0 year ago": [ 125 | "this year" 126 | ], 127 | "1 day ago": [ 128 | "bi" 129 | ], 130 | "1 month ago": [ 131 | "last month" 132 | ], 133 | "1 week ago": [ 134 | "last week" 135 | ], 136 | "1 year ago": [ 137 | "last year" 138 | ], 139 | "in 1 day": [ 140 | "suba" 141 | ], 142 | "in 1 month": [ 143 | "next month" 144 | ], 145 | "in 1 week": [ 146 | "next week" 147 | ], 148 | "in 1 year": [ 149 | "next year" 150 | ] 151 | }, 152 | "locale_specific": {} 153 | } -------------------------------------------------------------------------------- /dateparser_data/cldr_language_data/date_translation_data/uz-Arab.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uz-Arab", 3 | "date_order": "YMD", 4 | "january": [ 5 | "جنو", 6 | "جنوری" 7 | ], 8 | "february": [ 9 | "فبر", 10 | "فبروری" 11 | ], 12 | "march": [ 13 | "مار", 14 | "مارچ" 15 | ], 16 | "april": [ 17 | "اپر", 18 | "اپریل" 19 | ], 20 | "may": [ 21 | "می" 22 | ], 23 | "june": [ 24 | "جون" 25 | ], 26 | "july": [ 27 | "جول", 28 | "جولای" 29 | ], 30 | "august": [ 31 | "اگس", 32 | "اگست" 33 | ], 34 | "september": [ 35 | "سپت", 36 | "سپتمبر" 37 | ], 38 | "october": [ 39 | "اکت", 40 | "اکتوبر" 41 | ], 42 | "november": [ 43 | "نوم", 44 | "نومبر" 45 | ], 46 | "december": [ 47 | "دسم", 48 | "دسمبر" 49 | ], 50 | "monday": [ 51 | "د", 52 | "دوشنبه" 53 | ], 54 | "tuesday": [ 55 | "س", 56 | "سه‌شنبه" 57 | ], 58 | "wednesday": [ 59 | "چ", 60 | "چهارشنبه" 61 | ], 62 | "thursday": [ 63 | "پ", 64 | "پنجشنبه" 65 | ], 66 | "friday": [ 67 | "ج", 68 | "جمعه" 69 | ], 70 | "saturday": [ 71 | "ش", 72 | "شنبه" 73 | ], 74 | "sunday": [ 75 | "ی", 76 | "یکشنبه" 77 | ], 78 | "am": [ 79 | "am" 80 | ], 81 | "pm": [ 82 | "pm" 83 | ], 84 | "year": [ 85 | "year" 86 | ], 87 | "month": [ 88 | "month" 89 | ], 90 | "week": [ 91 | "week" 92 | ], 93 | "day": [ 94 | "day" 95 | ], 96 | "hour": [ 97 | "hour" 98 | ], 99 | "minute": [ 100 | "minute" 101 | ], 102 | "second": [ 103 | "second" 104 | ], 105 | "relative-type": { 106 | "0 day ago": [ 107 | "today" 108 | ], 109 | "0 hour ago": [ 110 | "this hour" 111 | ], 112 | "0 minute ago": [ 113 | "this minute" 114 | ], 115 | "0 month ago": [ 116 | "this month" 117 | ], 118 | "0 second ago": [ 119 | "now" 120 | ], 121 | "0 week ago": [ 122 | "this week" 123 | ], 124 | "0 year ago": [ 125 | "this year" 126 | ], 127 | "1 day ago": [ 128 | "yesterday" 129 | ], 130 | "1 month ago": [ 131 | "last month" 132 | ], 133 | "1 week ago": [ 134 | "last week" 135 | ], 136 | "1 year ago": [ 137 | "last year" 138 | ], 139 | "in 1 day": [ 140 | "tomorrow" 141 | ], 142 | "in 1 month": [ 143 | "next month" 144 | ], 145 | "in 1 week": [ 146 | "next week" 147 | ], 148 | "in 1 year": [ 149 | "next year" 150 | ] 151 | }, 152 | "locale_specific": {} 153 | } -------------------------------------------------------------------------------- /dateparser_data/settings.py: -------------------------------------------------------------------------------- 1 | default_parsers = [ 2 | "timestamp", 3 | "relative-time", 4 | "custom-formats", 5 | "absolute-time", 6 | ] 7 | 8 | settings = { 9 | # Date order 10 | "DATE_ORDER": "MDY", 11 | "PREFER_LOCALE_DATE_ORDER": True, 12 | # Timezone related 13 | "TIMEZONE": "local", 14 | "TO_TIMEZONE": False, 15 | "RETURN_AS_TIMEZONE_AWARE": "default", 16 | # Incomplete dates 17 | "PREFER_DAY_OF_MONTH": "current", 18 | "PREFER_MONTH_OF_YEAR": "current", 19 | "PREFER_DATES_FROM": "current_period", 20 | "RELATIVE_BASE": False, 21 | "STRICT_PARSING": False, 22 | "REQUIRE_PARTS": [], 23 | # Language detection 24 | "SKIP_TOKENS": ["t"], 25 | "NORMALIZE": True, 26 | "DEFAULT_LANGUAGES": [], 27 | # Optional language detection 28 | "LANGUAGE_DETECTION_CONFIDENCE_THRESHOLD": 0.5, 29 | # Other settings 30 | "RETURN_TIME_AS_PERIOD": False, 31 | "PARSERS": default_parsers, 32 | "CACHE_SIZE_LIMIT": 1000, 33 | } 34 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/base_data.yaml: -------------------------------------------------------------------------------- 1 | skip: [" ", "'", ",", "-", ".", "/", ";", "@", "[", "]", "|", ","] 2 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/ar.yaml: -------------------------------------------------------------------------------- 1 | sentence_splitter_group : 6 2 | 3 | skip: ["الساعة", "في", "مساءً", "هـ"] 4 | 5 | monday: 6 | - الإثنين 7 | 8 | year: 9 | - عام 10 | - سنة 11 | month: 12 | - شهر 13 | week: 14 | - أسبوع 15 | day: 16 | - أيام 17 | hour: 18 | - ساعة 19 | - ساعات 20 | minute: 21 | - دقيقة 22 | - دقائق 23 | second: 24 | - ثانية 25 | 26 | ago: 27 | - منذ 28 | - مضت 29 | in: 30 | - خلال 31 | 32 | am: 33 | - صباحاً 34 | 35 | relative-type: 36 | 1 day ago: 37 | - اليوم السابق 38 | - الأمس 39 | 2 day: 40 | - يومين 41 | 2 hour: 42 | - ساعتين 43 | 1 hour ago: 44 | - ساعة واحدة 45 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/be.yaml: -------------------------------------------------------------------------------- 1 | skip: ["каля", "у", "і", "ў"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - Пнд 7 | tuesday: 8 | - Аўт 9 | thursday: 10 | - Чцв 11 | - Чв 12 | friday: 13 | - Пят 14 | saturday: 15 | - Суб 16 | sunday: 17 | - Няд 18 | 19 | january: 20 | - Стд 21 | april: 22 | - Крс 23 | may: 24 | - Траўня 25 | - Тра 26 | august: 27 | - Жнівеня 28 | - Жнв 29 | september: 30 | - Врс 31 | october: 32 | - Кст 33 | november: 34 | - Ліс 35 | december: 36 | - Снж 37 | 38 | year: 39 | - гады 40 | - года 41 | - гадоў 42 | month: 43 | - месяца 44 | - месяцы 45 | - месяцаў 46 | week: 47 | - тыдзень 48 | - тыдня 49 | - тыдні 50 | - тыдняў 51 | day: 52 | - дні 53 | - дзён 54 | - дзен 55 | hour: 56 | - гадзіны 57 | - гадзіну 58 | - гадзін 59 | minute: 60 | - хвілін 61 | - хвіліны 62 | - хвіліну 63 | - хвіл 64 | second: 65 | - секунды 66 | - секунду 67 | - секунд 68 | - сек 69 | 70 | ago: 71 | - таму назад 72 | - таму 73 | - назад 74 | in: 75 | - на працягу 76 | 77 | relative-type: 78 | 2 day ago: 79 | - пазаўчора 80 | 1 day ago: 81 | - ўчора 82 | 0 day ago: 83 | - сення 84 | 85 | simplifications: 86 | - ^гадзіна: 1 гадзіна 87 | - гадзіну: 1 гадзіну 88 | - ^хвіліну: 1 хвіліну 89 | - ^секунду: 1 секунду 90 | - некалькі секунд: 44 секунды 91 | - некалькі хвілін: 2 хвіліны 92 | - (\d+[.,]?\d*)\s*гадзін\s(\d+[.,]?\d*)\s*хвілін: \1:\2 93 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/bg.yaml: -------------------------------------------------------------------------------- 1 | skip: ["върху", "до", "на", "около", "от", "под"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - пон 7 | tuesday: 8 | - вто 9 | wednesday: 10 | - сря 11 | 12 | january: 13 | - ян 14 | february: 15 | - фв 16 | april: 17 | - ап 18 | june: 19 | - юн 20 | july: 21 | - юл 22 | september: 23 | - септ 24 | - септм 25 | 26 | year: 27 | - год 28 | - години 29 | month: 30 | - мес 31 | - месеци 32 | week: 33 | - с 34 | - сед 35 | - седмици 36 | day: 37 | - дни 38 | - дена 39 | hour: 40 | - часа 41 | minute: 42 | - минути 43 | second: 44 | - сек 45 | - секунди 46 | 47 | ago: 48 | - преди 49 | in: 50 | - след 51 | - после 52 | - подир 53 | 54 | relative-type: 55 | 10 year ago: 56 | - преди десетилетие 57 | 1 year ago: 58 | - преди година 59 | in 10 year: 60 | - след 1 десетилетие 61 | 1 week ago: 62 | - преди седмица 63 | 2 day ago: 64 | - онзи ден 65 | 1 day ago: 66 | - снощи 67 | - преди ден 68 | in 1 day: 69 | - след ден 70 | in 2 day: 71 | - вдругиден 72 | 1 hour ago: 73 | - преди час 74 | in 1 hour: 75 | - след час 76 | 77 | simplifications: 78 | - един: '1' 79 | - два: '2' 80 | - три: '3' 81 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/bn.yaml: -------------------------------------------------------------------------------- 1 | skip: ["ই", "এবং", "টা", "প্রায়", "লা", "শে"] 2 | 3 | sentence_splitter_group : 3 4 | 5 | january: 6 | - জানুয়ারি 7 | february: 8 | - ফেব্রুয়ারি 9 | 10 | year: 11 | - বৎসর 12 | - সাল 13 | 14 | ago: 15 | - আগে 16 | in: 17 | - মধ্যে 18 | 19 | relative-type: 20 | in 1 year: 21 | - আগামী বছর 22 | in 1 month: 23 | - আগামী মাস 24 | in 1 week: 25 | - আগামী সপ্তাহ 26 | 2 day ago: 27 | - গত পরশু 28 | 29 | simplifications: 30 | - মধ্যাহ্ন: '12:00' 31 | - মধ্যরাত: '00:00' 32 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/ca.yaml: -------------------------------------------------------------------------------- 1 | skip: ["de", "del", "i", "l'"] 2 | pertain: ["de", "del"] 3 | 4 | in: 5 | - en 6 | 7 | relative-type: 8 | 0 day ago: 9 | - hui 10 | 2 day ago: 11 | - despús-ahir 12 | - abans-d’ahir 13 | - dellà-ahir 14 | in 2 day: 15 | - endemà 16 | - sendemà 17 | - despús-demà 18 | - demà passat 19 | - passat demà 20 | in 3 day: 21 | - endemà passat 22 | in 1 week: 23 | - la setmana vinent 24 | - la pròxima setmana 25 | - la propera setmana 26 | 27 | simplifications: 28 | - una: '1' 29 | - un: '1' 30 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/cs.yaml: -------------------------------------------------------------------------------- 1 | skip: ["přibližně", "v"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - Pon 7 | tuesday: 8 | - Úte 9 | wednesday: 10 | - Stř 11 | - Středu 12 | thursday: 13 | - Čtv 14 | friday: 15 | - Pát 16 | saturday: 17 | - Sob 18 | - Sobotu 19 | sunday: 20 | - Ned 21 | - Neděli 22 | 23 | february: 24 | - únr 25 | june: 26 | - Čer 27 | july: 28 | - Črc 29 | - črv 30 | 31 | year: 32 | - roků 33 | - roky 34 | month: 35 | - měsíců 36 | - měsíce 37 | - měsícem 38 | week: 39 | - týdnů 40 | - týdny 41 | - týdnem 42 | day: 43 | - dnů 44 | - dny 45 | hour: 46 | - hodin 47 | - hodiny 48 | - hodinou 49 | - hodinu 50 | - hodinami 51 | minute: 52 | - minut 53 | - minutami 54 | - minuty 55 | second: 56 | - sekundy 57 | - sekund 58 | - vteřina 59 | - vteřin 60 | - vteřiny 61 | 62 | ago: 63 | - před 64 | in: 65 | - ve 66 | - v 67 | 68 | relative-type: 69 | 2 day ago: 70 | - předevčírem 71 | 72 | simplifications: 73 | - teď: 0 sekunda 74 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/da.yaml: -------------------------------------------------------------------------------- 1 | skip: ["cirka", "d.", "kl", "kl."] 2 | 3 | sentence_splitter_group : 1 4 | 5 | month: 6 | - måneder 7 | week: 8 | - uger 9 | day: 10 | - dage 11 | hour: 12 | - timer 13 | minute: 14 | - minutter 15 | second: 16 | - sekunder 17 | 18 | ago: 19 | - siden 20 | in: 21 | - i 22 | 23 | relative-type-regex: 24 | \1 hour ago: 25 | - for (\d+[.,]?\d*)\s*h 26 | - for (\d+[.,]?\d*) timer 27 | \1 minute ago: 28 | - for (\d+[.,]?\d*)\s*m 29 | - for (\d+[.,]?\d*) minutter 30 | \1 second ago: 31 | - for (\d+[.,]?\d*)\s*s 32 | - for (\d+[.,]?\d*) sekunder 33 | 34 | simplifications: 35 | - en: '1' 36 | - et: '1' 37 | - (\d+[.,]?\d*)\s*hr(s?): \1 time\2 38 | - (\d+[.,]?\d*)\s*min(s?): \1 minut\2 39 | - (\d+[.,]?\d*)\s*sec(s?): \1 sekund\2 40 | - middag: '12:00' 41 | - midnat: '00:00' 42 | - (\d+[.,]?\d*)h(\d+[.,]?\d*)m?: \1:\2 43 | - mindre end 1 minut siden: 45 seconds 44 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/de.yaml: -------------------------------------------------------------------------------- 1 | skip: ["etwa", "uhr", "um", "und"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - Mon 7 | tuesday: 8 | - Die 9 | wednesday: 10 | - Mit 11 | thursday: 12 | - Don 13 | friday: 14 | - Fre 15 | saturday: 16 | - Sam 17 | sunday: 18 | - Son 19 | 20 | january: 21 | - Jänner 22 | february: 23 | - Feber 24 | march: 25 | - Mrz 26 | september: 27 | - Sept 28 | 29 | year: 30 | - Jahre 31 | - Jahren 32 | month: 33 | - Monate 34 | - Monaten 35 | week: 36 | - Wochen 37 | day: 38 | - Tage 39 | - Tagen 40 | hour: 41 | - Stunden 42 | minute: 43 | - Minuten 44 | second: 45 | - Sekunden 46 | 47 | ago: 48 | - vor 49 | in: 50 | - in 51 | - im 52 | 53 | relative-type: 54 | 2 day ago: 55 | - vorgestern 56 | in 2 day: 57 | - übermorgen 58 | 59 | relative-type-regex: 60 | \1 hour ago: 61 | - vor (\d+[.,]?\d*)\s*h 62 | \1 minute ago: 63 | - vor (\d+[.,]?\d*)\s*m 64 | \1 second ago: 65 | - vor (\d+[.,]?\d*)\s*s 66 | 67 | simplifications: 68 | - einer: '1' 69 | - einem: '1' 70 | - ein: '1' 71 | - zwei: '2' 72 | - drei: '3' 73 | - vier: '4' 74 | - fünf: '5' 75 | - sechs: '6' 76 | - sieben: '7' 77 | - acht: '8' 78 | - neun: '9' 79 | - zehn: '10' 80 | - elf: '11' 81 | - zwölf: '12' 82 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/en.yaml: -------------------------------------------------------------------------------- 1 | skip: ["about", "ad", "and", "at", "by", "just", "m", "nd", "of", "on", "rd", "st", "th", "the"] 2 | pertain: ["of"] 3 | 4 | sentence_splitter_group : 1 5 | 6 | tuesday: 7 | - Tues 8 | 9 | september: 10 | - sept 11 | 12 | decade: 13 | - decade 14 | - decades 15 | year: 16 | - y 17 | - years 18 | month: 19 | - months 20 | week: 21 | - weeks 22 | day: 23 | - d 24 | - days 25 | hour: 26 | - h 27 | - hours 28 | - hrs 29 | minute: 30 | - m 31 | - minutes 32 | - mins 33 | second: 34 | - s 35 | - seconds 36 | - secs 37 | 38 | ago: 39 | - ago 40 | - before 41 | in: 42 | - in 43 | - from now 44 | - after 45 | 46 | relative-type: 47 | 2 day ago: 48 | - day before yesterday 49 | 1 decade ago: 50 | - last decade 51 | - this decade 52 | in 1 decade: 53 | - next decade 54 | in 2 day: 55 | - day after tomorrow 56 | 0 day ago: 57 | - till date 58 | 59 | relative-type-regex: 60 | in \1 decade: 61 | - in (\d+[.,]?\d*) decades? 62 | \1 decade ago: 63 | - (\d+[.,]?\d*) decades? ago 64 | 65 | simplifications: 66 | - an: '1' 67 | - a: '1' 68 | - (?:12\s+)?noon: '12:00' 69 | - (?:12\s+)?midnight: '00:00' 70 | - (\d+[.,]?\d*)h(\d+[.,]?\d*): \1:\2 71 | - (?<=from\s+)now: in 72 | - less than 1 minute ago: 45 second ago 73 | - (\d+[.,]?\d*) (decade|year|month|week|day|hour|minute|second)s? later: in \1 \2 74 | - one: '1' 75 | - two: '2' 76 | - three: '3' 77 | - four: '4' 78 | - five: '5' 79 | - six: '6' 80 | - seven: '7' 81 | - eight: '8' 82 | - nine: '9' 83 | - ten: '10' 84 | - eleven: '11' 85 | - twelve: '12' 86 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/es.yaml: -------------------------------------------------------------------------------- 1 | skip: ["a las", "cerca", "de", "del", "en", "y"] 2 | pertain: ["de", "del"] 3 | 4 | sentence_splitter_group : 2 5 | 6 | monday: 7 | - Lu 8 | wednesday: 9 | - Mi 10 | thursday: 11 | - Ju 12 | friday: 13 | - Vi 14 | saturday: 15 | - Sa 16 | sunday: 17 | - Do 18 | 19 | september: 20 | - Setiembre 21 | - Sep 22 | - Set 23 | 24 | year: 25 | - años 26 | month: 27 | - meses 28 | week: 29 | - semanas 30 | day: 31 | - días 32 | hour: 33 | - horas 34 | minute: 35 | - minutos 36 | second: 37 | - segundos 38 | 39 | ago: 40 | - hace 41 | in: 42 | - en 43 | 44 | relative-type: 45 | 2 day ago: 46 | - anteayer 47 | 48 | simplifications: 49 | - una: '1' 50 | - un: '1' 51 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/fa.yaml: -------------------------------------------------------------------------------- 1 | sentence_splitter_group : 6 2 | 3 | tuesday: 4 | - سهشنبه 5 | wednesday: 6 | - چهار شنبه 7 | thursday: 8 | - پنج شنبه 9 | saturday: 10 | - روز شنبه 11 | - دو شنبه 12 | - د 13 | 14 | january: 15 | - جنوری 16 | february: 17 | - فبروری 18 | march: 19 | - مارچ 20 | april: 21 | - اپریل 22 | may: 23 | - می 24 | june: 25 | - جون 26 | july: 27 | - جولای 28 | august: 29 | - آگست 30 | september: 31 | - سپتمبر 32 | october: 33 | - اکتوبر 34 | november: 35 | - نومبر 36 | december: 37 | - دسمبر 38 | 39 | second: 40 | - دوم 41 | 42 | ago: 43 | - پیش 44 | in: 45 | - در 46 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/fi.yaml: -------------------------------------------------------------------------------- 1 | skip: [":n"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | january: 6 | - tammikuussa 7 | february: 8 | - helmikuussa 9 | march: 10 | - maaliskuussa 11 | april: 12 | - huhtikuussa 13 | may: 14 | - toukokuussa 15 | june: 16 | - kesäkuussa 17 | july: 18 | - heinäkuussa 19 | august: 20 | - elokuussa 21 | september: 22 | - Syyskuussa 23 | october: 24 | - Lokakuussa 25 | november: 26 | - Marraskuussa 27 | december: 28 | - Joulukuussa 29 | 30 | year: 31 | - vuotta 32 | - vv 33 | - vuonna 34 | - vuoden 35 | month: 36 | - kuukautta 37 | - kuukauden 38 | week: 39 | - viikkoa 40 | - vko 41 | - viikon 42 | day: 43 | - päivää 44 | - p 45 | - pvä 46 | - pvää 47 | - päivän 48 | hour: 49 | - tuntia 50 | - tunnin 51 | minute: 52 | - minuuttia 53 | - minuutin 54 | second: 55 | - sekuntia 56 | - sekuntti 57 | - sekunttia 58 | - sekuntin 59 | - sekunnin 60 | 61 | ago: 62 | - sitten 63 | in: 64 | - kuluttua 65 | - päästä 66 | 67 | relative-type: 68 | 2 year ago: 69 | - toissa vuonna 70 | 2 month ago: 71 | - toissa kuussa 72 | 2 week ago: 73 | - toissa viikolla 74 | 2 day ago: 75 | - toissa päivänä 76 | 77 | simplifications: 78 | - (\d+[.,]?\d*) (sekunnin|sekuntin|minuutin|tunnin|päivän|viikon|kuukauden|vuoden) (päästä|kuluttua): \3 \1 \2 79 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/fr.yaml: -------------------------------------------------------------------------------- 1 | skip: ["environ", "er", "et", "le", "à"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - lu 7 | tuesday: 8 | - ma 9 | wednesday: 10 | - me 11 | thursday: 12 | - je 13 | friday: 14 | - ve 15 | saturday: 16 | - sa 17 | sunday: 18 | - di 19 | 20 | january: 21 | - jan 22 | february: 23 | - fév 24 | june: 25 | - jun 26 | july: 27 | - jul 28 | august: 29 | - aoû 30 | september: 31 | - sep 32 | 33 | year: 34 | - années 35 | - ans 36 | week: 37 | - semaines 38 | day: 39 | - jours 40 | hour: 41 | - heures 42 | minute: 43 | - minutes 44 | second: 45 | - secondes 46 | 47 | ago: 48 | - il ya 49 | - il y a 50 | in: 51 | - dans 52 | - en 53 | - après 54 | 55 | relative-type: 56 | 2 day ago: 57 | - avant-hier 58 | in 2 day: 59 | - après-demain 60 | 61 | simplifications: 62 | - d'une: '1' 63 | - d'un: '1' 64 | - une: '1' 65 | - un: '1' 66 | - (\d+[.,]?\d*)\s+h\s+(\d+[.,]?\d*)\s+min: \1h\2m 67 | - (\d+[.,]?\d*)h(\d+[.,]?\d*)m?: \1:\2 68 | - moins\s(?:de\s)?(\d+[.,]?\d*)\s?(minute|seconde|heure): \1 \2 69 | - moins\s(?:de\s)?(\d+[.,]?\d*)\s?s: \1 seconde 70 | - moins\s(?:de\s)?(\d+[.,]?\d*)\s?m: \1 minute 71 | - moins\s(?:de\s)?(\d+[.,]?\d*)\s?h: \1 heure 72 | - deux: '2' 73 | - trois: '3' 74 | - quatre: '4' 75 | - cinq: '5' 76 | - six: '6' 77 | - sept: '7' 78 | - huit: '8' 79 | - neuf: '9' 80 | - dix: '10' 81 | - onze: '11' 82 | - douze: '12' 83 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/he.yaml: -------------------------------------------------------------------------------- 1 | sentence_splitter_group : 1 2 | 3 | skip: ["ב-", "בסביבות", "בערך", "בקירוב", "בשעה", "ה-"] 4 | 5 | monday: 6 | - שני 7 | - יום ב 8 | tuesday: 9 | - שלישי 10 | - יום ג 11 | wednesday: 12 | - רביעי 13 | - יום ד 14 | thursday: 15 | - חמישי 16 | - יום ה 17 | friday: 18 | - שישי 19 | - יום ו 20 | sunday: 21 | - ראשון 22 | - יום א 23 | 24 | january: 25 | - לינואר 26 | - בינואר 27 | - ינו 28 | february: 29 | - בפברואר 30 | - לפברואר 31 | - פבר 32 | march: 33 | - במרץ 34 | - למרץ 35 | - מרס 36 | - במרס 37 | - למרס 38 | - מארס 39 | - במארס 40 | - למארס 41 | april: 42 | - באפריל 43 | - לאפריל 44 | - אפר 45 | may: 46 | - במאי 47 | - למאי 48 | june: 49 | - ביוני 50 | - ליוני 51 | - יונ 52 | july: 53 | - ביולי 54 | - ליולי 55 | - יול 56 | august: 57 | - באוגוסט 58 | - לאוגוסט 59 | - אוג 60 | september: 61 | - בספטמבר 62 | - לספטמבר 63 | - ספט 64 | october: 65 | - באוקטובר 66 | - לאוקטובר 67 | - אוק 68 | november: 69 | - בנובמבר 70 | - לנובמבר 71 | - נוב 72 | december: 73 | - בדצמבר 74 | - לדצמבר 75 | - דצמ 76 | 77 | year: 78 | - שנים 79 | - בשנה 80 | month: 81 | - חודשים 82 | - בחודש 83 | week: 84 | - שבועות 85 | day: 86 | - ימים 87 | - ביום 88 | hour: 89 | - שעות 90 | minute: 91 | - דקות 92 | second: 93 | - שניה 94 | - שניות 95 | 96 | ago: 97 | - לפני 98 | in: 99 | - בעוד 100 | - עוד 101 | 102 | simplifications: 103 | - ויום: 1 יום 104 | - ושבוע: 1 שבוע 105 | - וחודש: 1 חודש 106 | - ושנה: 1 שנה 107 | - ו(\w+): \1 108 | - שנתיי?ם: 2 שנים 109 | - חודשיים: 2 חודשים 110 | - שבועיי?ם: 2 שבועות 111 | - יומיי?ם: 2 ימים 112 | - שעתיי?ם: 2 שעות 113 | - שלשום: 2 ימים 114 | - מחר: בעוד 1 יום 115 | - אחר חצות: am 116 | - חצות: 12 am 117 | - לפנות בוקר: am 118 | - בבוקר: am 119 | - בצהריי?ם: pm 120 | - אחרי ה?צהריי?ם: pm 121 | - אחה"צ: pm 122 | - לפנות ערב: pm 123 | - בערב: pm 124 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/hi.yaml: -------------------------------------------------------------------------------- 1 | skip: ["के", "को", "बजे", "सन्", "से"] 2 | 3 | sentence_splitter_group : 3 4 | 5 | september: 6 | - सितम्बर 7 | october: 8 | - अक्टूबर 9 | november: 10 | - नवम्बर 11 | december: 12 | - दिसम्बर 13 | decade: 14 | - दशक 15 | 16 | year: 17 | - साल 18 | - वर्षों 19 | month: 20 | - महीना 21 | - मास 22 | - महीने 23 | day: 24 | - दिवस 25 | hour: 26 | - घंटे 27 | 28 | ago: 29 | - पहले 30 | - पूर्व 31 | in: 32 | - में 33 | - बाद 34 | 35 | relative-type: 36 | 2 day ago: 37 | - परसों 38 | 1 decade ago: 39 | - पिछला दशक 40 | in 1 decade: 41 | - अगला दशक 42 | 43 | relative-type-regex: 44 | in \1 decade: 45 | - (\d+[.,]?\d*) दशक में 46 | \1 decade ago: 47 | - (\d+[.,]?\d*) दशक पहले 48 | 49 | 50 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/hu.yaml: -------------------------------------------------------------------------------- 1 | skip: ["-a", "-ai", "-akor", "-e", "-ei", "-ekor", "-es", "-i", "-ig", "-je", "-jei", "-ji", "-kor", "-tól", "-től", "-áig", "-án", "-ától", "-éig", "-én", "-étől", "-ös"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | sunday: 6 | - vas 7 | 8 | january: 9 | - I 10 | february: 11 | - feb 12 | - II 13 | march: 14 | - már 15 | - III 16 | april: 17 | - IV 18 | may: 19 | - V 20 | june: 21 | - VI 22 | july: 23 | - VII 24 | august: 25 | - VIII 26 | september: 27 | - IX 28 | october: 29 | - X 30 | november: 31 | - XI 32 | december: 33 | - XII 34 | 35 | year: 36 | - évek 37 | - évvel 38 | - éve 39 | month: 40 | - hó 41 | - hónapok 42 | - hónappal 43 | - hónapja 44 | week: 45 | - hetek 46 | - héttel 47 | - hete 48 | day: 49 | - napok 50 | - napja 51 | - nappal 52 | hour: 53 | - ó 54 | - órák 55 | - órája 56 | - órával 57 | - óráig 58 | - órától 59 | minute: 60 | - p 61 | - percek 62 | - perce 63 | - perccel 64 | - percig 65 | - perctől 66 | second: 67 | - mp 68 | - másodpercek 69 | - másodperce 70 | - másodperccel 71 | - másodpercig 72 | - másodperctől 73 | ago: 74 | - ezelőtt 75 | in: 76 | - múlva 77 | 78 | relative-type: 79 | 2 day ago: 80 | - tegnapelőtt 81 | 82 | simplifications: 83 | - egy: '1' 84 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/id.yaml: -------------------------------------------------------------------------------- 1 | skip: ["pukul", "tanggal", "yang"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | sunday: 6 | - Ahad 7 | 8 | august: 9 | - Agu 10 | september: 11 | - Sept 12 | 13 | ago: 14 | - lalu 15 | in: 16 | - dalam 17 | 18 | relative-type: 19 | 1 year: 20 | - setahun 21 | 1 month: 22 | - sebulan 23 | 1 week: 24 | - seminggu 25 | 2 day ago: 26 | - kemarin lusa 27 | 1 day: 28 | - sehari 29 | 0 second ago: 30 | - baru saja 31 | 32 | relative-type-regex: 33 | \1 week ago: 34 | - (\d+[.,]?\d*) minggu lalu 35 | \1 month ago: 36 | - (\d+[.,]?\d*) bulan lalu 37 | \1 year ago: 38 | - (\d+[.,]?\d*) tahun lalu 39 | \1 week: 40 | - (\d+[.,]?\d*) minggu 41 | sunday: 42 | - minggu 43 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/it.yaml: -------------------------------------------------------------------------------- 1 | skip: ["circa", "e"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | year: 6 | - anni 7 | month: 8 | - mesi 9 | week: 10 | - settimane 11 | day: 12 | - giorni 13 | hour: 14 | - ore 15 | minute: 16 | - minuti 17 | second: 18 | - secondi 19 | 20 | ago: 21 | - fa 22 | in: 23 | - in 24 | 25 | relative-type: 26 | 2 day ago: 27 | - altro ieri 28 | 29 | simplifications: 30 | - (\d+[.,]?\d*)\s+ora: \1 ore 31 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/ja.yaml: -------------------------------------------------------------------------------- 1 | no_word_spacing: "True" 2 | 3 | sentence_splitter_group : 4 4 | 5 | skip: ["約"] 6 | 7 | pertain: ["の"] 8 | 9 | monday: 10 | - (月) 11 | tuesday: 12 | - (火) 13 | wednesday: 14 | - (水) 15 | thursday: 16 | - (木) 17 | friday: 18 | - (金) 19 | saturday: 20 | - (土) 21 | sunday: 22 | - (日) 23 | 24 | january: 25 | - 一月 26 | february: 27 | - 二月 28 | march: 29 | - 三月 30 | april: 31 | - 四月 32 | may: 33 | - 五月 34 | june: 35 | - 六月 36 | july: 37 | - 七月 38 | august: 39 | - 八月 40 | september: 41 | - 九月 42 | october: 43 | - 十月 44 | november: 45 | - 十一月 46 | december: 47 | - 十二月 48 | 49 | month: 50 | - ヶ月 51 | - カ月 52 | - か月 53 | week: 54 | - 週間 55 | day: 56 | - 日間 57 | hour: 58 | - 時間 59 | minute: 60 | - 分間 61 | second: 62 | - 秒間 63 | ago: 64 | - 前 65 | in: 66 | - 今から 67 | - で 68 | 69 | relative-type: 70 | 0 second ago: 71 | - 現在 72 | 2 day ago: 73 | - 一昨日 74 | 2 week ago: 75 | - 先々週 76 | 1 year ago: 77 | - 去年 78 | in 2 day: 79 | - 明後日 80 | 81 | simplifications: 82 | - (\d+[.,]?\d*)年(?:\s+)?(\d+[.,]?\d*)月(?:\s+)?(\d+[.,]?\d*)日: \1-\2-\3 83 | - (\d+[.,]?\d*)月(?:\s+)?(\d+[.,]?\d*)日: \1-\2 84 | - (\d+[.,]?\d*)時(?:\s+)?(\d+[.,]?\d*)分(?:\s+)?(\d+[.,]?\d*)秒: \1:\2:\3 85 | - (\d+[.,]?\d*)時(?:\s+)?(\d+[.,]?\d*)分: \1:\2 86 | - (\d+[.,]?\d*)時$: \1:00 87 | - 正午: '12:00' 88 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/ka.yaml: -------------------------------------------------------------------------------- 1 | skip: ["და", "დაახლოებით", "ზე", "ის"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | year: 6 | - წლის 7 | 8 | ago: 9 | - წინ 10 | in: 11 | - დღეიდან 12 | 13 | simplifications: 14 | - ერთ: '1' 15 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/nb.yaml: -------------------------------------------------------------------------------- 1 | week: 2 | - uker 3 | day: 4 | - dager 5 | hour: 6 | - timer 7 | 8 | ago: 9 | - siden 10 | in: 11 | - om 12 | 13 | relative-type-regex: 14 | \1 day ago: 15 | - for (\d+[.,]?\d*) dager siden -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/nl.yaml: -------------------------------------------------------------------------------- 1 | skip: ["om"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | month: 6 | - maanden 7 | week: 8 | - weken 9 | day: 10 | - dagen 11 | minute: 12 | - minuten 13 | second: 14 | - seconden 15 | 16 | ago: 17 | - geleden 18 | in: 19 | - in 20 | 21 | relative-type: 22 | 1 year ago: 23 | - vorige jaar 24 | 2 day ago: 25 | - eergisteren 26 | in 2 day: 27 | - overmorgen 28 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/pl.yaml: -------------------------------------------------------------------------------- 1 | sentence_splitter_group : 1 2 | 3 | skip: ["i", "o", "r.", "roku", "w"] 4 | 5 | monday: 6 | - Poniedziałek 7 | - Poniedzialek 8 | - Pon 9 | - Pn 10 | tuesday: 11 | - Wtorek 12 | - Wt 13 | - Wto 14 | wednesday: 15 | - Środa 16 | - Sroda 17 | - Środę 18 | - Srode 19 | - Śro 20 | - Sro 21 | - Śr 22 | - Sr 23 | thursday: 24 | - Czwartek 25 | - Czw 26 | - Cz 27 | friday: 28 | - Piątek 29 | - Piatek 30 | - Pią 31 | - Pia 32 | - Pi 33 | - Pt 34 | saturday: 35 | - Sobota 36 | - Sobotę 37 | - Sobote 38 | - Sob 39 | - So 40 | - Sb 41 | sunday: 42 | - Niedziela 43 | - Niedzielę 44 | - Niedziele 45 | - Nie 46 | - Nd 47 | 48 | january: 49 | - Styczeń 50 | - Styczen 51 | - Stycznia 52 | - Styczniu 53 | - Sty 54 | february: 55 | - Luty 56 | - Lutego 57 | - Lutym 58 | - Lut 59 | march: 60 | - Marzec 61 | - Marca 62 | - Marcu 63 | - Mar 64 | april: 65 | - Kwiecień 66 | - Kwiecien 67 | - Kwietnia 68 | - Kwietniu 69 | - Kwi 70 | - Kwie 71 | may: 72 | - Maj 73 | - Maja 74 | - Maju 75 | june: 76 | - Czerwiec 77 | - Czerwca 78 | - Czerwcu 79 | - Cze 80 | july: 81 | - Lipiec 82 | - Lipca 83 | - Lipcu 84 | - Lip 85 | august: 86 | - Sierpień 87 | - Sierpien 88 | - Sierpnia 89 | - Sierpniu 90 | - Sie 91 | september: 92 | - Wrzesień 93 | - Wrzesien 94 | - Września 95 | - Wrzesnia 96 | - Wrześniu 97 | - Wrzesniu 98 | - Wrz 99 | october: 100 | - Październik 101 | - Pazdziernik 102 | - Października 103 | - Pazdziernika 104 | - Październiku 105 | - Pazdzierniku 106 | - Paź 107 | - Paz 108 | november: 109 | - Listopad 110 | - Listopada 111 | - Listopadzie 112 | - Lis 113 | december: 114 | - Grudzień 115 | - Grudzien 116 | - Grudnia 117 | - Grudniu 118 | - Gru 119 | 120 | year: 121 | - lata 122 | - lat 123 | month: 124 | - miesiac 125 | - miesięcy 126 | - miesiąca 127 | - miesiące 128 | - miesiace 129 | week: 130 | - tydzien 131 | - tygodni 132 | - tygodnie 133 | day: 134 | - dzien 135 | - dnia 136 | - dniu 137 | - dni 138 | hour: 139 | - godzinę 140 | - godzine 141 | - godzin 142 | - godziny 143 | minute: 144 | - minuty 145 | - minut 146 | - minute 147 | - minutę 148 | second: 149 | - sekundę 150 | - sekunde 151 | - sekundy 152 | - sekund 153 | 154 | ago: 155 | - temu 156 | in: 157 | - za 158 | 159 | simplifications: 160 | - dziś: 0 dnia 161 | - dzisiaj: 0 dnia 162 | - onegdaj: 2 dnia 163 | - przedwczoraj: 2 dnia temu 164 | - jutro: za 1 dnia 165 | - pojutrze: za 2 dnia 166 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/pt.yaml: -------------------------------------------------------------------------------- 1 | skip: ["cerca", "de", "e", "às"] 2 | pertain: ["de"] 3 | 4 | sentence_splitter_group : 1 5 | 6 | monday: 7 | - Segunda 8 | tuesday: 9 | - Terça 10 | wednesday: 11 | - Quarta 12 | thursday: 13 | - Quinta 14 | friday: 15 | - Sexta 16 | saturday: 17 | - Sab 18 | 19 | september: 20 | - Septembro 21 | 22 | year: 23 | - anos 24 | month: 25 | - meses 26 | week: 27 | - semanas 28 | day: 29 | - dias 30 | hour: 31 | - horas 32 | minute: 33 | - minutos 34 | second: 35 | - segundos 36 | 37 | ago: 38 | - atrás 39 | - há 40 | in: 41 | - em 42 | 43 | relative-type: 44 | 2 day ago: 45 | - anteontem 46 | 47 | simplifications: 48 | - uma: '1' 49 | - um: '1' 50 | - alguns segundos: 44 segundos 51 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/ro.yaml: -------------------------------------------------------------------------------- 1 | skip: ["de", "la"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | wednesday: 6 | - Mi 7 | 8 | february: 9 | - Febr 10 | march: 11 | - Mart 12 | september: 13 | - Sep 14 | november: 15 | - Noiem 16 | 17 | year: 18 | - ani 19 | month: 20 | - luna 21 | - luni 22 | week: 23 | - săptămâni 24 | day: 25 | - zile 26 | hour: 27 | - ore 28 | minute: 29 | - minute 30 | second: 31 | - secunde 32 | 33 | ago: 34 | - în urmă 35 | in: 36 | - în 37 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/ru.yaml: -------------------------------------------------------------------------------- 1 | skip: ["в", "во", "и", "около", "примерно"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - пнд 7 | tuesday: 8 | - втр 9 | wednesday: 10 | - срд 11 | - среду 12 | thursday: 13 | - чтв 14 | friday: 15 | - птн 16 | - пятницу 17 | saturday: 18 | - сбт 19 | - субботу 20 | sunday: 21 | - воскресение 22 | - вск 23 | 24 | february: 25 | - Фев 26 | september: 27 | - Сен 28 | november: 29 | - Ноя 30 | 31 | year: 32 | - года 33 | - году 34 | - лет 35 | month: 36 | - месяца 37 | - месяцев 38 | week: 39 | - недели 40 | - недель 41 | - неделю 42 | day: 43 | - дня 44 | - дней 45 | - сутки 46 | - суток 47 | hour: 48 | - часа 49 | - часов 50 | minute: 51 | - минуты 52 | - минут 53 | - минуту 54 | second: 55 | - секунды 56 | - секунд 57 | - секунду 58 | 59 | ago: 60 | - назад 61 | in: 62 | - в течение 63 | - спустя 64 | - через 65 | 66 | relative-type: 67 | 2 day ago: 68 | - позавчера 69 | in 2 day: 70 | - послезавтра 71 | in 3 day: 72 | - послепослезавтра 73 | 74 | simplifications: 75 | - од(на|ну|ни|ной|ин): '1' 76 | - дв(а|е|ое|ух): '2' 77 | - пар[ауы]: '2' 78 | - три: '3' 79 | - четыре: '4' 80 | - пять: '5' 81 | - шесть: '6' 82 | - семь: '7' 83 | - восемь: '8' 84 | - девять: '9' 85 | - десять: '10' 86 | - одиннадцать: '11' 87 | - двенадцать: '12' 88 | - пятнадцать: '15' 89 | - двадцать: '20' 90 | - тридцать: '30' 91 | - сорок: '40' 92 | - пятьдесят: '50' 93 | - несколько секунд: 44 секунды 94 | - полчаса: 30 минут 95 | - полгода: 6 месяцев 96 | - полтора часа: 90 минут 97 | - полтора года: 18 месяцев 98 | - ((?<=(через|спустя|в течение)\s+)секунд[уы]|(?<=[^\d]\s+|^)секунду(?=(\s+назад))): 1 секунду 99 | - ((?<=(через|спустя|в течение)\s+)минут[уы]|(?<=[^\d]\s+|^)минуту(?=(\s+назад))): 1 минуту 100 | - ((?<=(через|спустя|в течение)\s+)часа?|(?<=[^\d]\s+|^)час(?=(\s+назад))): 1 час 101 | - ((?<=(через|спустя|в течение)\s+)(день|дня)|(?<=[^\d]\s+|^)день(?=(\s+назад))): 1 день 102 | - ((?<=(через|спустя|в течение)\s+)сут(ки|ок)|(?<=[^\d]\s+|^)сутки(?=(\s+назад))): 1 сутки 103 | - ((?<=(через|спустя|в течение)\s+)недел[юи]|(?<=[^\d]\s+|^)неделю(?=(\s+назад))): 1 неделю 104 | - ((?<=(через|спустя|в течение)\s+)месяца?|(?<=[^\d]\s+|^)месяц(?=(\s+назад))): 1 месяц 105 | - ((?<=(через|спустя|в течение)\s+)года?|(?<=[^\d]\s+|^)год(?=(\s+назад))): 1 год 106 | - (\d{3,}1)\s*год\s*$: \1 107 | - (\d*[02-9])\s*год\b: \1 108 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/sk.yaml: -------------------------------------------------------------------------------- 1 | skip: ["v", "vo"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | wednesday: 6 | - stredu 7 | saturday: 8 | - sobotu 9 | sunday: 10 | - nedeľu 11 | 12 | ago: 13 | - pred 14 | in: 15 | - o 16 | - za 17 | 18 | relative-type: 19 | 2 day ago: 20 | - predvčerom 21 | in 2 days: 22 | - pozajtra 23 | 24 | relative-type-regex: 25 | in \1 day: 26 | - o (\d+[.,]?\d*) dni 27 | in \1 hour: 28 | - o (\d+[.,]?\d*) hodiny 29 | in \1 minute: 30 | - o (\d+[.,]?\d*) minúty 31 | in \1 month: 32 | - o (\d+[.,]?\d*) mesiace 33 | in \1 second: 34 | - o (\d+[.,]?\d*) sekundy 35 | in \1 week: 36 | - o (\d+[.,]?\d*) týždne 37 | in \1 year: 38 | - o (\d+[.,]?\d*) roky 39 | 40 | simplifications: 41 | - pred sekundou: pred 1 sekundou 42 | - pred minútou: pred 1 minútou 43 | - pred hodinou: pred 1 hodinou 44 | - pred týždňom: pred 1 týždňom 45 | - pred mesiacom: pred 1 mesiacom 46 | - pred rokom: pred 1 rokom 47 | - pred pol rokom: pred 6 mesiacmi 48 | - o sekundu: o 1 sekundu 49 | - o minútu: o 1 minútu 50 | - o hodinu: o 1 hodinu 51 | - o týždeň: o 1 týždeň 52 | - o mesiac: o 1 mesiac 53 | - o rok: o 1 rok 54 | - o pol roka: o 6 mesiacov 55 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/sv.yaml: -------------------------------------------------------------------------------- 1 | skip: ["den", "på"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - Månd 7 | tuesday: 8 | - Tisd 9 | wednesday: 10 | - Onsd 11 | thursday: 12 | - Torsd 13 | friday: 14 | - Fred 15 | saturday: 16 | - Lörd 17 | sunday: 18 | - Sönd 19 | 20 | june: 21 | - Jun 22 | july: 23 | - Jul 24 | september: 25 | - Sept 26 | 27 | year: 28 | - året 29 | month: 30 | - månader 31 | - månaden 32 | week: 33 | - veckor 34 | day: 35 | - dagar 36 | hour: 37 | - timmar 38 | - t 39 | minute: 40 | - minuter 41 | second: 42 | - sekunder 43 | 44 | ago: 45 | - sedan 46 | in: 47 | - om 48 | - från nu 49 | 50 | relative-type: 51 | 1 year ago: 52 | - förra året 53 | 2 day ago: 54 | - förrgår 55 | 1 day ago: 56 | - igår 57 | 0 day ago: 58 | - idag 59 | in 1 day: 60 | - imorgon 61 | 62 | simplifications: 63 | - en: '1' 64 | - två: '2' 65 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/th.yaml: -------------------------------------------------------------------------------- 1 | sentence_splitter_group : 5 2 | 3 | skip: ["น.", "เมื่อ ", "เวลา"] 4 | 5 | monday: 6 | - จันทร์ 7 | - วันจันทร์ที่ 8 | tuesday: 9 | - อังคาร 10 | - วันอังคารที่ 11 | wednesday: 12 | - พุธ 13 | - วันพุธที่ 14 | thursday: 15 | - พฤหัสบดี 16 | - พฤหัส 17 | - วันพฤหัสบดีที่ 18 | friday: 19 | - ศุกร์ 20 | - วันศุกร์ที่ 21 | saturday: 22 | - เสาร์ 23 | - วันเสาร์ที่ 24 | sunday: 25 | - อาทิตย์ 26 | - วันอาทิตย์ที่ 27 | 28 | january: 29 | - เดือนมกราคม 30 | - มกรา 31 | february: 32 | - เดือนกุมภาพันธ์ 33 | - กุมภา 34 | march: 35 | - เดือนมีนาคม 36 | - มีนา 37 | april: 38 | - เมษา 39 | - เดือนเมษายน 40 | may: 41 | - เดือนพฤษภาคม 42 | - พฤษภา 43 | june: 44 | - เดือนมิถุนายน 45 | - มิถุนา 46 | july: 47 | - เดือนกรกฏาคม 48 | - กรกฎา 49 | august: 50 | - สิงหา 51 | - เดือนสิงหาคม 52 | september: 53 | - กันยา 54 | - เดือนกันยายน 55 | october: 56 | - เดือนตุลาคม 57 | - ตุลา 58 | november: 59 | - เดือนพฤศจิกายน 60 | - พฤศจิ 61 | december: 62 | - เดือนธันวาคม 63 | - ธันวา 64 | 65 | ago: 66 | - แต่ก่อน 67 | - มาแล้ว 68 | - ก่อน 69 | in: 70 | - ใน 71 | 72 | simplifications: 73 | - วันนี้: 0 วัน 74 | - เมื่อวานนี้: 1 วัน 75 | - 1 วันที่แล้ว: 1 วัน 76 | - เมื่อวานซืน: 2 วัน 77 | - 2 วันที่แล้ว: 2 วัน 78 | - เมื่อสักครู่นี้: 0 วินาที 79 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/tl.yaml: -------------------------------------------------------------------------------- 1 | sentence_splitter_group : 1 2 | 3 | skip: ["ganap", "na", "noon", "noong", "sa"] 4 | 5 | monday: 6 | - Lunes 7 | - Lun 8 | tuesday: 9 | - Martes 10 | wednesday: 11 | - Miyerkules 12 | - Miy 13 | thursday: 14 | - Huwebes 15 | - Huw 16 | friday: 17 | - Biyernes 18 | - Biy 19 | saturday: 20 | - Sabado 21 | - Sab 22 | sunday: 23 | - Linggo 24 | - Lin 25 | 26 | january: 27 | - Enero 28 | - Ene 29 | february: 30 | - Pebrero 31 | - Peb 32 | march: 33 | - Marso 34 | - Mar 35 | april: 36 | - Abril 37 | - Abr 38 | may: 39 | - Mayo 40 | - May 41 | june: 42 | - Hunyo 43 | - Hun 44 | july: 45 | - Hulyo 46 | - Hul 47 | august: 48 | - Agosto 49 | - Ago 50 | september: 51 | - Setyembre 52 | - Set 53 | october: 54 | - Oktubre 55 | - Okt 56 | november: 57 | - Nobyembre 58 | - Nob 59 | december: 60 | - Disyembre 61 | - Dis 62 | 63 | year: 64 | - taon 65 | month: 66 | - buwan 67 | week: 68 | - linggo 69 | day: 70 | - araw 71 | hour: 72 | - oras 73 | minute: 74 | - minuto 75 | second: 76 | - segundo 77 | 78 | ago: 79 | - nakaraan 80 | - nakalipas 81 | in: 82 | - sa 83 | 84 | simplifications: 85 | - kahapon: 1 araw nakaraan 86 | - ngayon: 0 segundo nakalipas 87 | - isang araw: 2 araw 88 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/tr.yaml: -------------------------------------------------------------------------------- 1 | skip: ["ve", "yaklaşık"] 2 | 3 | sentence_splitter_group : 1 4 | 5 | wednesday: 6 | - Çrs 7 | thursday: 8 | - Prs 9 | 10 | january: 11 | - Oc 12 | february: 13 | - Şu 14 | april: 15 | - Ni 16 | june: 17 | - Ha 18 | july: 19 | - Te 20 | august: 21 | - Ağ 22 | september: 23 | - Ey 24 | october: 25 | - Ek 26 | november: 27 | - Ka 28 | december: 29 | - Ar 30 | 31 | year: 32 | - sene 33 | 34 | ago: 35 | - önce 36 | in: 37 | - içerisinde 38 | - içinde 39 | - sonra 40 | 41 | relative-type: 42 | in 1 year: 43 | - önümüzdeki yıl 44 | in 1 month: 45 | - önümüzdeki ay 46 | in 1 week: 47 | - haftaya 48 | - önümüzdeki hafta 49 | 1 day ago: 50 | - geçen gün 51 | in 1 day: 52 | - önümüzdeki gün 53 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/vi.yaml: -------------------------------------------------------------------------------- 1 | pertain: ['lúc'] 2 | 3 | sentence_splitter_group : 1 4 | 5 | monday: 6 | - Thứ 2 7 | tuesday: 8 | - Thứ 3 9 | wednesday: 10 | - Thứ 4 11 | thursday: 12 | - Thứ 5 13 | friday: 14 | - Thứ 6 15 | saturday: 16 | - Thứ 7 17 | sunday: 18 | - Thứ 1 19 | 20 | january: 21 | - Tháng một 22 | february: 23 | - Tháng hai 24 | march: 25 | - Tháng ba 26 | april: 27 | - Tháng tư 28 | may: 29 | - Tháng năm 30 | june: 31 | - Tháng sáu 32 | july: 33 | - Tháng bảy 34 | august: 35 | - Tháng tám 36 | september: 37 | - Tháng chín 38 | october: 39 | - Tháng mười 40 | november: 41 | - Tháng mười một 42 | december: 43 | - Tháng mười hai 44 | 45 | month: 46 | - thang 47 | - Thg 48 | week: 49 | - tuần lể 50 | day: 51 | - ban ngày 52 | - buổi 53 | minute: 54 | - chút 55 | - lát 56 | - nguyên bản 57 | second: 58 | - giây đồng hồ 59 | - hạng nhì 60 | 61 | ago: 62 | - cách đây 63 | - trước đây 64 | - trước 65 | - trước 66 | in: 67 | - trong 68 | 69 | simplifications: 70 | - (?:ngày|năm)\s(\d+[.,]?\d*): \1 71 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/yue.yaml: -------------------------------------------------------------------------------- 1 | no_word_spacing: "True" 2 | 3 | sentence_splitter_group : 4 4 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/zh-Hans.yaml: -------------------------------------------------------------------------------- 1 | no_word_spacing: "True" 2 | 3 | sentence_splitter_group : 4 4 | 5 | relative-type: 6 | 2 day ago: 7 | - 前天 8 | 0 second ago: 9 | - 刚刚 10 | 0 hour ago: 11 | - 这一时间 12 | - 此时 13 | in 2 days: 14 | - 后天 -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/zh-Hant.yaml: -------------------------------------------------------------------------------- 1 | no_word_spacing: "True" 2 | 3 | sentence_splitter_group : 4 4 | -------------------------------------------------------------------------------- /dateparser_data/supplementary_language_data/date_translation_data/zh.yaml: -------------------------------------------------------------------------------- 1 | no_word_spacing: "True" 2 | 3 | sentence_splitter_group : 4 4 | 5 | skip: ["约"] 6 | 7 | monday: 8 | - 礼拜一 9 | tuesday: 10 | - 礼拜二 11 | wednesday: 12 | - 礼拜三 13 | thursday: 14 | - 礼拜四 15 | friday: 16 | - 礼拜五 17 | saturday: 18 | - 礼拜六 19 | sunday: 20 | - 星期天 21 | - 礼拜日 22 | - 礼拜天 23 | 24 | month: 25 | - 个月 26 | - 個月 27 | week: 28 | - 星期 29 | day: 30 | - 天 31 | 32 | ago: 33 | - 前 34 | in: 35 | - 在 36 | 37 | relative-type: 38 | 2 day ago: 39 | - 前天 40 | 0 second ago: 41 | - 刚刚 42 | 0 hour ago: 43 | - 这一时间 44 | - 此时 45 | in 2 days: 46 | - 后天 47 | 48 | simplifications: 49 | - 半小时前: 30分前 50 | - (?:中午|下午|(?:晚上?))(?:\s*)(\d+[.,]?\d*)(?:\s*):(?:\s+|:)?(\d+[.,]?\d*): \1:\2 pm 51 | - (?:上午|早上|凌晨)(?:\s*)(\d+[.,]?\d*)(?:\s*):(?:\s+|:)?(\d+[.,]?\d*): \1:\2 am 52 | - 中午: '12:00' 53 | - (\d+[.,]?\d*)年(?:\s+)?(\d+[.,]?\d*)月(?:\s+)?(\d+[.,]?\d*)日(?:\s+)?(\d+[.,]?\d*)时(?:\s+)?(\d+[.,]?\d*)分: \1-\2-\3 \4:\5 54 | - (\d+[.,]?\d*)年(?:\s+)?(\d+[.,]?\d*)月(?:\s+)?(\d{1,2})(?:日)?(?:\s+)?(\d{1,2})(?:点|:)(\d{1,2}): \1-\2-\3 \4:\5 55 | - (\d+[.,]?\d*)年(?:\s+)?(\d+[.,]?\d*)月(?:\s+)?(\d{1,2})(?:日)?: \1-\2-\3 56 | - (\d+[.,]?\d*)月(?=.*[前后]): \1 月 57 | -------------------------------------------------------------------------------- /dateparser_scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scrapinghub/dateparser/180e697d95fc848d26fb0940351eebc2732b03ce/dateparser_scripts/__init__.py -------------------------------------------------------------------------------- /dateparser_scripts/requirements.txt: -------------------------------------------------------------------------------- 1 | gitpython 2 | parsel 3 | requests 4 | ruamel.yaml 5 | -------------------------------------------------------------------------------- /dateparser_scripts/update_supported_languages_and_locales.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | from tempfile import TemporaryFile 5 | 6 | from dateparser.data.languages_info import language_locale_dict 7 | 8 | 9 | def to_string(data): 10 | result = "" 11 | language_column_width = 18 12 | for language in sorted(data): 13 | result += language 14 | locales = data[language] 15 | if locales: 16 | result += " " * (language_column_width - len(language)) 17 | result += ", ".join("'{}'".format(locale) for locale in sorted(locales)) 18 | result += "\n" 19 | return result 20 | 21 | 22 | def main(): 23 | readme_path = os.path.join( 24 | os.path.dirname(__file__), "..", "docs", "supported_locales.rst" 25 | ) 26 | new_data = to_string(language_locale_dict) 27 | temporary_file = TemporaryFile("w+") 28 | with open(readme_path) as readme_file: 29 | delimiter = "============ ================================================================\n" 30 | delimiters_seen = 0 31 | is_inside_table = False 32 | for line in readme_file: 33 | if line == delimiter: 34 | delimiters_seen += 1 35 | is_inside_table = delimiters_seen == 2 36 | elif is_inside_table: 37 | continue 38 | temporary_file.write(line) 39 | if is_inside_table: 40 | temporary_file.write(new_data) 41 | temporary_file.seek(0) 42 | with open(readme_path, "w") as readme_file: 43 | readme_file.write(temporary_file.read()) 44 | temporary_file.close() 45 | 46 | 47 | if __name__ == "__main__": 48 | main() 49 | -------------------------------------------------------------------------------- /dateparser_scripts/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | from collections import OrderedDict 4 | 5 | from git import Repo 6 | 7 | 8 | def get_raw_data(): 9 | cldr_version = "31.0.1" 10 | raw_data_directory = "../raw_data" 11 | 12 | cldr_data = { 13 | "dates_full": { 14 | "url": "https://github.com/unicode-cldr/cldr-dates-full.git", 15 | "dir": "{}/cldr_dates_full/".format(raw_data_directory), 16 | }, 17 | "core": { 18 | "url": "https://github.com/unicode-cldr/cldr-core.git", 19 | "dir": "{}/cldr_core/".format(raw_data_directory), 20 | }, 21 | "rbnf": { 22 | "url": "https://github.com/unicode-cldr/cldr-rbnf.git", 23 | "dir": "{}/cldr_rbnf/".format(raw_data_directory), 24 | }, 25 | } 26 | 27 | if os.path.isdir(raw_data_directory): 28 | # remove current raw data 29 | shutil.rmtree(raw_data_directory) 30 | os.mkdir(raw_data_directory) 31 | 32 | for name, data in cldr_data.items(): 33 | print('Clonning "{}" from: {}'.format(name, data["url"])) 34 | repo = Repo.clone_from(data["url"], data["dir"], branch="master") 35 | repo.git.co(cldr_version) 36 | 37 | 38 | def get_dict_difference(parent_dict, child_dict): 39 | difference_dict = OrderedDict() 40 | for key, child_value in child_dict.items(): 41 | parent_value = parent_dict.get(key) 42 | child_specific_value = None 43 | if not parent_value: 44 | child_specific_value = child_value 45 | elif isinstance(child_value, list): 46 | child_specific_value = sorted(set(child_value) - set(parent_value)) 47 | elif isinstance(child_value, dict): 48 | child_specific_value = get_dict_difference(parent_value, child_value) 49 | elif child_value != parent_value: 50 | child_specific_value = child_value 51 | if child_specific_value: 52 | difference_dict[key] = child_specific_value 53 | return difference_dict 54 | 55 | 56 | def combine_dicts(primary_dict, supplementary_dict): 57 | combined_dict = OrderedDict() 58 | for key, value in primary_dict.items(): 59 | if key in supplementary_dict: 60 | if isinstance(value, list): 61 | combined_dict[key] = value + supplementary_dict[key] 62 | elif isinstance(value, dict): 63 | combined_dict[key] = combine_dicts(value, supplementary_dict[key]) 64 | else: 65 | combined_dict[key] = supplementary_dict[key] 66 | else: 67 | combined_dict[key] = primary_dict[key] 68 | remaining_keys = [ 69 | key for key in supplementary_dict.keys() if key not in primary_dict.keys() 70 | ] 71 | for key in remaining_keys: 72 | combined_dict[key] = supplementary_dict[key] 73 | return combined_dict 74 | -------------------------------------------------------------------------------- /docs/authors.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../AUTHORS.rst 2 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | .. _contributing: 2 | .. include:: ../CONTRIBUTING.rst 3 | -------------------------------------------------------------------------------- /docs/dateparser.calendars.rst: -------------------------------------------------------------------------------- 1 | dateparser.calendars package 2 | ============================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | 8 | Module contents 9 | --------------- 10 | .. automodule:: dateparser.calendars 11 | :members: 12 | :show-inheritance: 13 | -------------------------------------------------------------------------------- /docs/dateparser.languages.rst: -------------------------------------------------------------------------------- 1 | dateparser.languages package 2 | ============================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | dateparser.languages.dictionary module 8 | -------------------------------------- 9 | 10 | .. automodule:: dateparser.languages.dictionary 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | dateparser.languages.loader module 16 | ---------------------------------- 17 | 18 | .. automodule:: dateparser.languages.loader 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | dateparser.languages.locale module 24 | ---------------------------------- 25 | 26 | .. automodule:: dateparser.languages.locale 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | dateparser.languages.validation module 32 | -------------------------------------- 33 | 34 | .. automodule:: dateparser.languages.validation 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | 40 | Module contents 41 | --------------- 42 | 43 | .. automodule:: dateparser.languages 44 | :members: 45 | :undoc-members: 46 | :show-inheritance: 47 | -------------------------------------------------------------------------------- /docs/dateparser.rst: -------------------------------------------------------------------------------- 1 | dateparser package 2 | ================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | 9 | dateparser.languages 10 | dateparser.calendars 11 | 12 | Submodules 13 | ---------- 14 | 15 | dateparser.conf module 16 | ---------------------- 17 | 18 | .. automodule:: dateparser.conf 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | dateparser.date module 24 | ---------------------- 25 | 26 | .. automodule:: dateparser.date 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | dateparser.date_parser module 32 | ----------------------------- 33 | 34 | .. automodule:: dateparser.date_parser 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | dateparser.freshness_date_parser module 40 | --------------------------------------- 41 | 42 | .. automodule:: dateparser.freshness_date_parser 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | dateparser.timezone_parser module 48 | --------------------------------- 49 | 50 | .. automodule:: dateparser.timezone_parser 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | 55 | dateparser.timezones module 56 | --------------------------- 57 | 58 | .. automodule:: dateparser.timezones 59 | :members: 60 | :undoc-members: 61 | :show-inheritance: 62 | 63 | dateparser.utils module 64 | ----------------------- 65 | 66 | .. automodule:: dateparser.utils 67 | :members: 68 | :undoc-members: 69 | :show-inheritance: 70 | 71 | 72 | Module contents 73 | --------------- 74 | 75 | .. automodule:: dateparser 76 | :members: 77 | :undoc-members: 78 | :show-inheritance: 79 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../HISTORY.rst 2 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | ==================================================== 2 | dateparser -- python parser for human readable dates 3 | ==================================================== 4 | 5 | .. image:: https://img.shields.io/pypi/dm/dateparser 6 | :target: https://pypi.python.org/pypi/dateparser 7 | :alt: pypi downloads 8 | 9 | .. image:: https://img.shields.io/pypi/v/dateparser.svg 10 | :target: https://pypi.python.org/pypi/dateparser 11 | :alt: pypi version 12 | 13 | .. image:: https://codecov.io/gh/scrapinghub/dateparser/branch/master/graph/badge.svg 14 | :target: https://codecov.io/gh/scrapinghub/dateparser 15 | :alt: Code Coverage 16 | 17 | .. image:: https://github.com/scrapinghub/dateparser/workflows/Build/badge.svg 18 | :target: https://github.com/scrapinghub/dateparser/actions 19 | :alt: Github Build 20 | 21 | .. image:: https://readthedocs.org/projects/dateparser/badge/?version=latest 22 | :target: http://dateparser.readthedocs.org/en/latest/?badge=latest 23 | :alt: Documentation Status 24 | 25 | 26 | `dateparser` provides modules to easily parse localized dates in almost 27 | any string formats commonly found on web pages. 28 | 29 | 30 | Documentation 31 | ============= 32 | 33 | This documentation is built automatically and can be found on 34 | `Read the Docs `_. 35 | 36 | 37 | .. include:: introduction.rst 38 | 39 | Indices and tables 40 | ================== 41 | 42 | 43 | Contents: 44 | 45 | .. toctree:: 46 | :maxdepth: 2 47 | 48 | introduction 49 | installation 50 | usage 51 | settings 52 | custom_language_detection 53 | supported_locales 54 | contributing 55 | modules 56 | authors 57 | history 58 | 59 | 60 | * :ref:`genindex` 61 | * :ref:`modindex` 62 | * :ref:`search` 63 | 64 | -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Installation 3 | ============ 4 | 5 | At the command line:: 6 | 7 | $ pip install dateparser 8 | 9 | Or, if you don't have pip installed:: 10 | 11 | $ easy_install dateparser 12 | 13 | If you want to install from the latest sources, you can do:: 14 | 15 | $ git clone https://github.com/scrapinghub/dateparser.git 16 | $ cd dateparser 17 | $ python setup.py install 18 | -------------------------------------------------------------------------------- /docs/modules.rst: -------------------------------------------------------------------------------- 1 | API reference 2 | ============= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | dateparser 8 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx==7.2.6 2 | sphinx-rtd-theme==1.3.0 3 | -------------------------------------------------------------------------------- /docs/template.rst: -------------------------------------------------------------------------------- 1 | .. _language-data-template: 2 | 3 | Language Data Template 4 | ---------------------- 5 | 6 | .. sourcecode:: none 7 | 8 | two-letter language code as defined in ISO-639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). e.g. for English - en: 9 | name: language name (e.g. English) 10 | no_word_spacing: False (set to True for languages that do not use spaces between words) 11 | 12 | skip: ["words", "to", "skip", "such", "as", "and", "or", "at", "in", "alphabetical", "order"] 13 | 14 | pertain: [] 15 | 16 | monday: 17 | - name for Monday 18 | - abbreviation for Monday 19 | tuesday: 20 | - as above 21 | wednesday: 22 | - as above 23 | thursday: 24 | - as above 25 | friday: 26 | - as above 27 | saturday: 28 | - as above 29 | sunday: 30 | - as above 31 | 32 | january: 33 | - name for January 34 | - abbreviation for January 35 | february: 36 | - as above 37 | march: 38 | - as above 39 | april: 40 | - as above 41 | may: 42 | - as above 43 | june: 44 | - as above 45 | july: 46 | - as above 47 | august: 48 | - as above 49 | september: 50 | - as above 51 | october: 52 | - as above 53 | november: 54 | - as above 55 | december: 56 | - as above 57 | 58 | year: 59 | - name for year 60 | - abbreviation for year 61 | month: 62 | - as above 63 | week: 64 | - as above 65 | day: 66 | - as above 67 | hour: 68 | - as above 69 | minute: 70 | - as above 71 | second: 72 | - as above 73 | 74 | ago: 75 | - words that stand 76 | - for "ago" 77 | 78 | simplifications: 79 | - word: replacement 80 | - regex: replacement 81 | - day before yesterday: 2 days ago 82 | -------------------------------------------------------------------------------- /docs/usage.rst: -------------------------------------------------------------------------------- 1 | .. _using-datedataparser: 2 | 3 | 4 | Using DateDataParser 5 | -------------------- 6 | 7 | :func:`dateparser.parse` uses a default parser which tries to detect language 8 | every time it is called and is not the most efficient way while parsing dates 9 | from the same source. 10 | 11 | :class:`DateDataParser ` provides an alternate and efficient way 12 | to control language detection behavior. 13 | 14 | The instance of :class:`DateDataParser ` caches the found 15 | languages and will prioritize them when trying to parse the next string. 16 | 17 | :class:`dateparser.date.DateDataParser` can also be initialized with known languages: 18 | 19 | >>> ddp = DateDataParser(languages=['de', 'nl']) 20 | >>> ddp.get_date_data('vr jan 24, 2014 12:49') 21 | DateData(date_obj=datetime.datetime(2014, 1, 24, 12, 49), period='day', locale='nl') 22 | >>> ddp.get_date_data('18.10.14 um 22:56 Uhr') 23 | DateData(date_obj=datetime.datetime(2014, 10, 18, 22, 56), period='day', locale='de') 24 | >>> ddp.get_date_data('11 July 2012') 25 | DateData(date_obj=None, period='day', locale=None) 26 | -------------------------------------------------------------------------------- /fuzzing/build.sh: -------------------------------------------------------------------------------- 1 | cd "$SRC"/dateparser 2 | pip3 install . 3 | 4 | # Build fuzzers in $OUT 5 | for fuzzer in $(find fuzzing -name '*_fuzzer.py');do 6 | compile_python_fuzzer "$fuzzer" --add-binary="dateparser/data:dateparser/data" 7 | done 8 | zip -q $OUT/dateparser_fuzzer_seed_corpus.zip $SRC/corpus/* 9 | -------------------------------------------------------------------------------- /fuzzing/corpus/current: -------------------------------------------------------------------------------- 1 | now EST 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/date_time: -------------------------------------------------------------------------------- 1 | January 12, 2012 10:00 PM 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/french: -------------------------------------------------------------------------------- 1 | Le 11 Décembre 2014 à 09:00 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/minutes_offset: -------------------------------------------------------------------------------- 1 | 2 minutes ago 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/russian: -------------------------------------------------------------------------------- 1 | 13 января 2015 г. в 13:34 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/thai: -------------------------------------------------------------------------------- 1 | 1 เดือนตุลาคม 2005, 1:00 AM 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/time: -------------------------------------------------------------------------------- 1 | 10:00 am 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/time_offset: -------------------------------------------------------------------------------- 1 | 2 hours ago -0500 2 | -------------------------------------------------------------------------------- /fuzzing/corpus/turkish: -------------------------------------------------------------------------------- 1 | yaklaşık 23 saat önce 2 | -------------------------------------------------------------------------------- /fuzzing/fuzz_helpers.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | import datetime 3 | import io 4 | import tempfile 5 | from typing import List, TypeVar 6 | 7 | import atheris 8 | 9 | T = TypeVar("T") 10 | 11 | 12 | class EnhancedFuzzedDataProvider(atheris.FuzzedDataProvider): 13 | def ConsumeRandomBytes(self) -> bytes: 14 | return self.ConsumeBytes(self.ConsumeIntInRange(0, self.remaining_bytes())) 15 | 16 | def ConsumeRandomString(self) -> str: 17 | return self.ConsumeUnicodeNoSurrogates( 18 | self.ConsumeIntInRange(0, self.remaining_bytes()) 19 | ) 20 | 21 | def ConsumeRemainingString(self) -> str: 22 | return self.ConsumeUnicodeNoSurrogates(self.remaining_bytes()) 23 | 24 | def ConsumeRemainingBytes(self) -> bytes: 25 | return self.ConsumeBytes(self.remaining_bytes()) 26 | 27 | def ConsumeSublist(self, source: List[T]) -> List[T]: 28 | """ 29 | Returns a shuffled sub-list of the given list of len [1, len(source)] 30 | """ 31 | chosen = [elem for elem in source if self.ConsumeBool()] 32 | 33 | # Shuffle 34 | for i in range(len(chosen) - 1, 1, -1): 35 | j = self.ConsumeIntInRange(0, i) 36 | chosen[i], chosen[j] = chosen[j], chosen[i] 37 | 38 | return chosen or [self.PickValueInList(source)] 39 | 40 | def ConsumeDate(self) -> datetime.datetime: 41 | try: 42 | return datetime.datetime.fromtimestamp(self.ConsumeFloat()) 43 | except (OverflowError, OSError, ValueError): 44 | return datetime.datetime(year=1970, month=1, day=1) 45 | 46 | @contextlib.contextmanager 47 | def ConsumeMemoryFile( 48 | self, all_data: bool = False, as_bytes: bool = True 49 | ) -> io.BytesIO: 50 | if all_data: 51 | file_data = ( 52 | self.ConsumeRemainingBytes() 53 | if as_bytes 54 | else self.ConsumeRemainingString() 55 | ) 56 | else: 57 | file_data = ( 58 | self.ConsumeRandomBytes() if as_bytes else self.ConsumeRandomString() 59 | ) 60 | 61 | file = io.BytesIO(file_data) if as_bytes else io.StringIO(file_data) 62 | yield file 63 | file.close() 64 | 65 | @contextlib.contextmanager 66 | def ConsumeTemporaryFile( 67 | self, suffix: str, all_data: bool = False, as_bytes: bool = True 68 | ) -> str: 69 | if all_data: 70 | file_data = ( 71 | self.ConsumeRemainingBytes() 72 | if as_bytes 73 | else self.ConsumeRemainingString() 74 | ) 75 | else: 76 | file_data = ( 77 | self.ConsumeRandomBytes() if as_bytes else self.ConsumeRandomString() 78 | ) 79 | 80 | mode = "w+b" if as_bytes else "w+" 81 | tfile = tempfile.NamedTemporaryFile(mode=mode, suffix=suffix) 82 | tfile.write(file_data) 83 | tfile.seek(0) 84 | tfile.flush() 85 | yield tfile.name 86 | tfile.close() 87 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.bumpversion] 2 | current_version = "1.2.1" 3 | commit = true 4 | tag = true 5 | 6 | [[tool.bumpversion.files]] 7 | filename = "dateparser/__init__.py" 8 | 9 | [[tool.bumpversion.files]] 10 | filename = 'HISTORY.rst' 11 | search = "\\(unreleased\\)$" 12 | replace = "({now:%Y-%m-%d})" 13 | regex = true 14 | 15 | [tool.ruff] 16 | exclude = ["date_translation_data"] 17 | 18 | [tool.ruff.lint.per-file-ignores] 19 | "dateparser/data/__init__.py" = ["F401"] 20 | "dateparser/languages/__init__.py" = ["F401"] 21 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | addopts = 3 | --doctest-modules 4 | --assert=plain 5 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from setuptools import find_packages, setup 4 | 5 | __version__ = re.search( 6 | r"__version__.*\s*=\s*[\"]([^\"]+)[\"]", open("dateparser/__init__.py").read() 7 | ).group(1) 8 | 9 | introduction = re.sub( 10 | r":members:.+|..\sautomodule::.+|:class:|:func:|:ref:", 11 | "", 12 | open("docs/introduction.rst", encoding="utf-8").read(), 13 | ) 14 | history = re.sub( 15 | r":mod:|:class:|:func:", "", open("HISTORY.rst", encoding="utf-8").read() 16 | ) 17 | 18 | setup( 19 | name="dateparser", 20 | version=__version__, 21 | description="Date parsing library designed to parse dates from HTML pages", 22 | long_description=introduction + "\n\n" + history, 23 | author="Scrapinghub", 24 | author_email="opensource@zyte.com", 25 | url="https://github.com/scrapinghub/dateparser", 26 | project_urls={ 27 | "History": "https://dateparser.readthedocs.io/en/latest/history.html", 28 | }, 29 | packages=find_packages(exclude=("tests", "tests.*")), 30 | include_package_data=True, 31 | install_requires=[ 32 | "python-dateutil>=2.7.0", 33 | "pytz>=2024.2", 34 | "regex>=2024.9.11", 35 | "tzlocal>=0.2", 36 | ], 37 | entry_points={ 38 | "console_scripts": ["dateparser-download = dateparser_cli.cli:entrance"], 39 | }, 40 | extras_require={ 41 | "calendars": ["convertdate>=2.2.1", "hijridate"], 42 | "fasttext": ["fasttext>=0.9.1", "numpy>=1.19.3,<2"], 43 | "langdetect": ["langdetect>=1.0.0"], 44 | }, 45 | license="BSD", 46 | zip_safe=False, 47 | keywords="dateparser", 48 | python_requires=">=3.8", # Python 3.8 is required for fuzzing 49 | classifiers=[ 50 | "Development Status :: 5 - Production/Stable", 51 | "Intended Audience :: Developers", 52 | "License :: OSI Approved :: BSD License", 53 | "Natural Language :: English", 54 | "Programming Language :: Python :: 3", 55 | "Programming Language :: Python :: 3.9", 56 | "Programming Language :: Python :: 3.10", 57 | "Programming Language :: Python :: 3.11", 58 | "Programming Language :: Python :: 3.12", 59 | "Programming Language :: Python :: 3.13", 60 | "Programming Language :: Python :: Implementation :: CPython", 61 | ], 62 | ) 63 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | from unittest import TestCase 2 | 3 | 4 | class BaseTestCase(TestCase): 5 | def setUp(self): 6 | super().setUp() 7 | self.__patches = [] 8 | 9 | self.error = NotImplemented 10 | 11 | def add_patch(self, patch): 12 | patch.start() 13 | self.__patches.append(patch) 14 | 15 | def tearDown(self): 16 | super().tearDown() 17 | for patch in reversed(self.__patches): 18 | patch.stop() 19 | 20 | def then_error_was_raised(self, error_cls, allowed_substrings=()): 21 | self.assertIsInstance(self.error, error_cls) 22 | self.assertTrue( 23 | any(mesg in str(self.error) for mesg in allowed_substrings), 24 | "Didn't found any of the expected messages (%r) -- message was: %r" 25 | % (allowed_substrings, self.error), 26 | ) 27 | -------------------------------------------------------------------------------- /tests/test_date_data.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | 3 | import pytest 4 | 5 | from dateparser.date import DateData 6 | 7 | 8 | class TestDateData: 9 | def test_get_item_like_dict(self): 10 | date = datetime(year=5432, month=3, day=1) 11 | dd = DateData(date_obj=date, period="day", locale="de") 12 | assert dd["date_obj"] == date 13 | assert dd["period"] == "day" 14 | assert dd["locale"] == "de" 15 | 16 | def test_get_item_like_dict_keyerror(self): 17 | dd = DateData(date_obj=None, period="day", locale="de") 18 | with pytest.raises(KeyError) as e: 19 | date_obj = dd["date"] 20 | assert e == "date" 21 | assert not date_obj 22 | 23 | def test_set_item_like_dict(self): 24 | dd = DateData() 25 | assert dd.date_obj is None 26 | 27 | date = datetime(year=5432, month=3, day=1) 28 | dd["date_obj"] = date 29 | assert dd.date_obj == date 30 | 31 | def test_set_item_like_dict_keyerror(self): 32 | dd = DateData() 33 | with pytest.raises(KeyError) as e: 34 | dd["date"] = datetime(year=5432, month=3, day=1) 35 | assert e == "date" 36 | 37 | @pytest.mark.parametrize( 38 | "date,period,locale,expected", 39 | [ 40 | ( 41 | datetime(year=2020, month=10, day=28), 42 | "day", 43 | "en", 44 | "DateData(date_obj=datetime.datetime(2020, 10, 28, 0, 0), period='day', locale='en')", 45 | ), 46 | ( 47 | datetime(year=2014, month=5, day=29, hour=3, minute=2), 48 | "day", 49 | "es", 50 | "DateData(date_obj=datetime.datetime(2014, 5, 29, 3, 2), period='day', locale='es')", 51 | ), 52 | ( 53 | datetime( 54 | year=2028, 55 | month=7, 56 | day=31, 57 | hour=3, 58 | minute=2, 59 | second=12, 60 | microsecond=601265, 61 | ), 62 | "time", 63 | "fr", 64 | "DateData(date_obj=datetime.datetime(2028, 7, 31, 3, 2, 12, 601265), period='time', locale='fr')", 65 | ), 66 | ( 67 | datetime(year=1994, month=8, day=1), 68 | "month", 69 | "ca", 70 | "DateData(date_obj=datetime.datetime(1994, 8, 1, 0, 0), period='month', locale='ca')", 71 | ), 72 | ( 73 | datetime(year=2033, month=10, day=12), 74 | "month", 75 | None, 76 | "DateData(date_obj=datetime.datetime(2033, 10, 12, 0, 0), period='month', locale=None)", 77 | ), 78 | (None, "day", None, "DateData(date_obj=None, period='day', locale=None)"), 79 | (None, "year", "fr", "DateData(date_obj=None, period='year', locale='fr')"), 80 | ], 81 | ) 82 | def test_repr(self, date, period, locale, expected): 83 | dd = DateData(date_obj=date, period=period, locale=locale) 84 | assert dd.__repr__() == expected 85 | -------------------------------------------------------------------------------- /tests/test_dateparser_data_integrity.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | pytest.importorskip("ruamel") 4 | 5 | from dateparser_scripts.write_complete_data import write_complete_data 6 | 7 | 8 | def test_dateparser_data_integrity(): 9 | files = write_complete_data(in_memory=True) 10 | 11 | for filename in files: 12 | with open(filename, "rb") as f: 13 | assert f.read().strip() == files[filename].strip(), ( 14 | 'The content of the file "{}" doesn\'t match the content' 15 | " of the generated file.".format(filename) 16 | ) 17 | -------------------------------------------------------------------------------- /tests/test_hijri.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | pytest.importorskip("hijridate") 4 | 5 | from datetime import datetime 6 | 7 | from parameterized import param, parameterized 8 | 9 | from dateparser.calendars.hijri import HijriCalendar 10 | from tests import BaseTestCase 11 | 12 | 13 | class TestHijriParser(BaseTestCase): 14 | def setUp(self): 15 | super().setUp() 16 | self.result = NotImplemented 17 | self.date_string = NotImplemented 18 | self.parser = NotImplemented 19 | self.translated = NotImplemented 20 | 21 | def when_date_is_given(self, dt_string, date_formats, languages): 22 | self.date_string = dt_string 23 | self.parser = HijriCalendar(dt_string) 24 | self.result = self.parser.get_date() 25 | 26 | def then_parsed_datetime_is(self, dt): 27 | self.assertEqual(dt, self.result["date_obj"]) 28 | 29 | @parameterized.expand( 30 | [ 31 | param( 32 | dt_string="14-09-1432 هـ, 09:40 صباحاً", 33 | dt_obj=datetime(2011, 8, 14, 9, 40), 34 | ), 35 | param( 36 | dt_string="20-02-1430 هـ, 07:21 صباحاً", 37 | dt_obj=datetime(2009, 2, 15, 7, 21), 38 | ), 39 | param( 40 | dt_string="11-08-1434 هـ, 09:38 صباحاً", 41 | dt_obj=datetime(2013, 6, 20, 9, 38), 42 | ), 43 | param( 44 | dt_string=" 17-01-1437 هـ 08:30 مساءً", 45 | dt_obj=datetime(2015, 10, 30, 20, 30), 46 | ), 47 | param( 48 | dt_string="29-02-1433 هـ, 06:22 صباحاً", 49 | dt_obj=datetime(2012, 1, 23, 6, 22), 50 | ), 51 | param(dt_string="30-02-1433", dt_obj=datetime(2012, 1, 24)), 52 | param( 53 | dt_string="04-03-1433 هـ, 10:08 مساءً", 54 | dt_obj=datetime(2012, 1, 27, 22, 8), 55 | ), 56 | param(dt_string="30-02-33", dt_obj=datetime(2012, 1, 24)), 57 | param(dt_string="10-03-90", dt_obj=datetime(1970, 5, 16)), 58 | ] 59 | ) 60 | def test_datetime_parsing( 61 | self, dt_string, dt_obj, date_formats=None, languages=None 62 | ): 63 | from dateparser.conf import settings 64 | 65 | settings.DATE_ORDER = "DMY" 66 | self.when_date_is_given(dt_string, date_formats, languages) 67 | self.then_parsed_datetime_is(dt_obj) 68 | settings.DATE_ORDER = "MDY" 69 | -------------------------------------------------------------------------------- /tests/test_pickle.py: -------------------------------------------------------------------------------- 1 | import pickle 2 | from datetime import datetime 3 | 4 | from dateparser import parse 5 | from dateparser.timezone_parser import StaticTzInfo 6 | from tests import BaseTestCase 7 | 8 | 9 | class TestPickle(BaseTestCase): 10 | def test_pickling_basic_parsed_object(self): 11 | now = parse("now") 12 | self.assertIsInstance(now, datetime) 13 | pickle_dumps = pickle.dumps(now) 14 | self.assertIsInstance(pickle_dumps, bytes) 15 | 16 | def test_pickling_parsed_object_with_tz(self): 17 | now_in_utc = parse("now in UTC") 18 | self.assertIsInstance(now_in_utc, datetime) 19 | self.assertIsInstance(now_in_utc.tzinfo, StaticTzInfo) 20 | pickle_dumps = pickle.dumps(now_in_utc) 21 | self.assertIsInstance(pickle_dumps, bytes) 22 | 23 | def test_unpickling_basic_parsed_object(self): 24 | now = parse("now") 25 | pickle_dumps = pickle.dumps(now) 26 | pickle_loads = pickle.loads(pickle_dumps) 27 | self.assertIsInstance(pickle_loads, datetime) 28 | 29 | def test_unpickling_parsed_object_with_tz(self): 30 | now_in_utc = parse("now in UTC") 31 | pickle_dumps = pickle.dumps(now_in_utc) 32 | pickle_loads = pickle.loads(pickle_dumps) 33 | self.assertIsInstance(pickle_loads, datetime) 34 | self.assertIsInstance(pickle_loads.tzinfo, StaticTzInfo) 35 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = pre-commit,min,min-all,py39,py310,py311,py312,py313,all,scripts,docs,twinedeck 3 | 4 | [base] 5 | deps = 6 | pytest 7 | pytest-cov 8 | 9 | [testenv] 10 | deps = 11 | {[base]deps} 12 | parameterized 13 | atheris; python_version < '3.12' 14 | commands = 15 | pytest --cov=dateparser --cov-report=xml {posargs: tests} 16 | 17 | [testenv:all] 18 | basepython = python3.13 19 | extras = 20 | calendars 21 | fasttext 22 | langdetect 23 | 24 | [testenv:min] 25 | basepython = python3.9 26 | deps = 27 | {[testenv]deps} 28 | python-dateutil==2.7.0 29 | pytz==2024.2 30 | regex==2024.9.11 31 | tzlocal==0.2 32 | 33 | [testenv:min-all] 34 | basepython = {[testenv:min]basepython} 35 | extras = {[testenv:all]extras} 36 | deps = 37 | {[testenv:min]deps} 38 | convertdate==2.2.1 39 | fasttext==0.9.1 40 | hijridate==2.3.0 41 | langdetect==1.0.0 42 | numpy==1.19.3 43 | 44 | [testenv:scripts] 45 | deps = 46 | {[base]deps} 47 | -rdateparser_scripts/requirements.txt 48 | commands = 49 | pytest --cov=dateparser --cov-report=xml {posargs:tests/test_dateparser_data_integrity.py} 50 | 51 | [testenv:pre-commit] 52 | basepython = python3 53 | deps = 54 | pre-commit 55 | commands = 56 | pre-commit run {posargs:--all-files} 57 | 58 | [testenv:docs] 59 | changedir = docs 60 | extras = [] 61 | deps = 62 | {[testenv]deps} 63 | -rdocs/requirements.txt 64 | commands = 65 | sphinx-build -W -b html . {envtmpdir}/html 66 | 67 | [testenv:twinecheck] 68 | basepython = python3 69 | deps = 70 | build 71 | twine 72 | commands = 73 | python -m build --sdist --wheel 74 | twine check dist/* 75 | --------------------------------------------------------------------------------