scrapinghub / scrapinghub/dateparser

What are the valid locale strings?

Open
#524 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Enhancement
Dominant language
Python
Stars
2.9k
Forks
520
Avg merge
22h 56m
Merged PRs (30d)
6

Description

Question/Bug Report:

If on dateparser.parse(s, locales=[locale_string]) I set:

en_US.UTF-8
el_GR.UTF-8
fi_FI.UTF-8
fi-FI

I get:

ValueError: Unknown locale(s): 'x'

However, setting fi as locale, works as expected.

Is this a known/expected behavior, or not?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the dateparser.parse entry point and trace how the locales argument validates values such as en_US.UTF-8, fi-FI, and fi. Check where supported locale strings are listed or documented. Done means clearly documenting which locale formats are accepted and whether the reported ValueError is expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
localization
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.