Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: scrapinghub/dateparser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.0
Choose a base ref
...
head repository: scrapinghub/dateparser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.1
Choose a head ref
  • 19 commits
  • 44 files changed
  • 16 contributors

Commits on Nov 17, 2023

  1. Fix the docs

    Gallaecio committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    c54d7e4 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Fixed RecursionError discovered by OSSFuzz by converting _split_by_kn…

    …own_words into an iterative function (#1201)
    
    Co-authored-by: bcapuano <bcapuano@asu.edu>
    ennamarie19 and capuanob authored Nov 22, 2023
    Configuration menu
    Copy the full SHA
    a4032c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3955530 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2023

  1. Configuration menu
    Copy the full SHA
    5bddb9f View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2023

  1. Configuration menu
    Copy the full SHA
    b354669 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2023

  1. Configuration menu
    Copy the full SHA
    5355e86 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. Configuration menu
    Copy the full SHA
    1bb5b42 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Configuration menu
    Copy the full SHA
    30e2c7f View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Configuration menu
    Copy the full SHA
    1d4b058 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Configuration menu
    Copy the full SHA
    29b1f94 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Configuration menu
    Copy the full SHA
    f659364 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Fix date_parser with prefer_month_of_year wrong results (#1224)

    * Fix date_parser with prefer_month_of_year wrong results
    
    Fix two problems
    1. Parser would use current month even if prefer_month_of_year was not
       current when relative_base was not none
    
    2. Parser would use current month to derive 'what is the last day of
       this month' - for example, with prefer_month=last and
       prefer_day=past, but current_month=april, it would return december
       30th, because it would use april to find that the last day was the
       30th, when it should use the month.
    
    Additionally, add a test to test_date_parser that uses prefer_month
    
    * Run pre-commit
    
    * Update test_dates_parse_utc_offset_does_not_throw to expect January
    
    It is parsing "0:4", french, with settings
    ```
                    "PREFER_DATES_FROM": "past",
                    "PREFER_DAY_OF_MONTH": "first",
                    "PREFER_LOCALE_DATE_ORDER": True,
                    "PREFER_MONTH_OF_YEAR": "current",
                    "RELATIVE_BASE": datetime(
                        year=1970, month=1, day=1, hour=0, minute=0, second=0
                    ),
    ```
    It used to expect to get `expected_date=datetime(1969, 12, 31, 14, 4)` but after my change it gets `datetime(1969, 1, 31, 14, 4)`
    I would argue that with PREFER_MONTH_OF_YEAR set to "Current", and "Current" being January 1st 1970, that `datetime(1969, 1, 31, 14, 4)` is a better result
    However with this particular set of configuration, I am not exactly 100% sure what to expect. These settings were generated by a fuzzer so perhaps they don't really make a ton of sense together anyway; rather than change the settings (and thus deviate from what the parser caught) I have opted to update the test expectation to accept January.
    
    * Update German test_search_and_parse to accept January for parsing of
    'Die'
    
    It is searching a German string for dates and asserting that when it finds the word "Die" in the string, it should be parsed as `datetime.datetime(1999, 12, 28, 0, 0)`
    Similarly, my change makes this `datetime.datetime(1999, 1, 28, 0, 0)` instead. I don't speak German, but as far as I can tell "Die" just means "The" so I have no idea why it is even matching it. In my opinion, this could be a bug with the search identifying a non-date word, and so I can't really guess as to what a sensible result would be. For the sake of simplicity, I also just updated this test to accept January,
    
    ---------
    
    Co-authored-by: Adrián Chaves <adrian@chaves.io>
    benbuzbee and Gallaecio authored Apr 8, 2024
    Configuration menu
    Copy the full SHA
    748e48a View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Configuration menu
    Copy the full SHA
    f114394 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Avoid repeated loop over timezones (#1238)

    By removing repeated iteration over timezones, the import time is reduced by 5-10%.
    nijel authored Oct 2, 2024
    Configuration menu
    Copy the full SHA
    6a7c91c View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. chore: update Python version (#1241)

    * chore: update Python version
    serhii73 authored Oct 25, 2024
    Configuration menu
    Copy the full SHA
    a4144c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2024

  1. Configuration menu
    Copy the full SHA
    47acb88 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2025

  1. Fix tests (#1248)

    * Fix tests
    
    * Fix the TestLocalTZOffset test
    
    * Setup tests for minimum deps
    
    * Run pre-commit
    
    ---------
    
    Co-authored-by: Adrián Chaves <adrian@chaves.io>
    serhii73 and Gallaecio authored Feb 3, 2025
    Configuration menu
    Copy the full SHA
    36a5634 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2025

  1. Release 1.2.1 (#1247)

    * Release 1.2.1
    
    * Update HISTORY.rst
    
    Co-authored-by: Andrey Rakhmatullin <wrar@debian.org>
    
    * Fix tests (#1248)
    
    * Fix tests
    
    * Fix the TestLocalTZOffset test
    
    * Setup tests for minimum deps
    
    * Run pre-commit
    
    ---------
    
    Co-authored-by: Adrián Chaves <adrian@chaves.io>
    
    * Add #1248 to History rst
    
    * .bumpversion.cfg → pyproject.toml, and have it set the release date
    
    * Undo version change to be made by bump-my-version
    
    * Update HISTORY.rst
    
    Co-authored-by: Adrián Chaves <adrian@chaves.io>
    
    * Use CODECOV_TOKEN.
    
    ---------
    
    Co-authored-by: Andrey Rakhmatullin <wrar@debian.org>
    Co-authored-by: Adrián Chaves <adrian@chaves.io>
    Co-authored-by: Andrey Rakhmatullin <wrar@wrar.name>
    4 people authored Feb 5, 2025
    Configuration menu
    Copy the full SHA
    7c39594 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    02bd2e5 View commit details
    Browse the repository at this point in the history
Loading