scrapinghub / scrapinghub/dateparser

Feature Request: get_date_data add key-value signifying a relative date?

Open
#579 0 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

Wow. This package is great!

Feature request here:
Parsing "1 day ago" will return a datetime set to one day before now. The granularity key-value will return a period="day". It would be very helpful is the date data response also notified that the datetime was compiled from a relative date string (e.g., relative=True), and possibly even the basis of the datetime used (e.g., relative_to=datetime(..now..))

Thanks, again!

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 get_date_data entry point and inspect how relative strings such as "1 day ago" are represented in its returned date data. Define the intended metadata for relative dates, including whether the reference datetime is exposed, then add tests that specify the response and confirm existing absolute-date behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
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.