scrapinghub / scrapinghub/dateparser

Add support for Japanese traditional calendar/Japanese digits

Open
#831 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The traditional japanese calendar counts its years based on the years since the current emperor has been reigning, described here https://www.ewc.co.jp/Pages/Information/CalendarEN.aspx It is usually written as a mix of Japanese text and digits, for example 平成30 is Heisei 30 which is 2018. This format is used uncommonly on the Japanese web.

Note that sometimes this can be accompanied by the use of non-ascii numerical characters, for example 1 instead of 1. These characters are recognized as digits in some parts of python - for example re's \d pattern, the str.isdigit method and the int function will recognize these characters as numbers while datetime's strptime patterns will 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

The issue does not name a repository file, test, or entry point. Start by tracing how dateparser handles calendar eras and non-ASCII digits, then review existing calendar-related tests; done means Japanese traditional dates such as 平成30 and their full-width digit variants are parsed correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
localization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.