changing range of month

オープン
#1,209 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python

調査の方向性

まず dateparser の translation-data と relative_base の処理を確認し、その後、issue に記載された Persian/Jalali の例を再現します。月の日数がどこで定義されているかを特定し、要求された 31/30/29 日のパターンが一貫して適用されていることを確認します。これらのペルシャ語の月名を使った検索で、要求された範囲が正しく処理されれば issue は完了です。

索引モデルが issue の本文から書いたものです。

説明

search_dates Type: Enhancement

Hi, I want to search for dates in phrases but in Persian language which use Jalali calendar.
Because Jalali calendar does not work for searching longer chunks of texts, I changed the translation data in this format:
I changed the months name in gregorian calendar without changing the calendar from gregorian to Jalali.
I also change the relative_base date to the current time in Jalali calendar (again without changing the calendar from gregorian to Jalali).

Everything works well except that in Jalali calendar length of month differ from those on Gregorian calendar. For example February has 28,29 days in Gregorian but 'اردیبهشت' which is equal to Feb has 31 days in Jalali calendar.
How can I fix that?
Precisely, I want to change length of month in gregorian calendar in this format:
first 6 months (Jan to Jun): has 31 days
next 5 months (Jul to Nov): 30 days
Dec: 29 days

very kind regards for any help

主要言語
Python
スター
2.9k
フォーク
545
平均マージ
2日 4時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

scrapinghub/dateparser のほかの issue

scrapinghub/dateparser の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。