Up to [cvs.NetBSD.org] / pkgsrc / time / py-dateparser
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
py-dateparser: updated to 1.4.3 1.4.3 (2026-09-03) Fixes: - Make parsing thread-safe: parsing from several threads no longer raises an intermittent ``KeyError`` from the shared language caches, and a ``DATE_ORDER`` or ``RELATIVE_BASE`` value meant for one parse no longer leaks into the settings that other parses read, where it could make them return a wrong date - Do not share the language detector and the detected locale between ``search_dates()`` calls, so concurrent searches over text in different languages no longer return ``None`` or a date read in the wrong locale - Resolve the ``BST`` and ``HDT`` timezone abbreviations to the offsets the tz database gives them, UTC+1 (British Summer Time) and UTC-9 (Hawaii-Aleutian Daylight Time), instead of +11 and -9:30, which no zone goes by those names today; abbreviations that the tz database maps to more than one offset, such as ``CST`` and ``IST``, keep their current offset. Text carrying these abbreviations keeps its wall clock but moves by 10 hours for ``BST`` and 30 minutes for ``HDT``, which can put the parsed instant on a different day - Reject a ``%j`` (day of year) value that the parsed year does not have, instead of rolling it over into the next year, so "1999366" with ``date_formats=["%Y%j"]`` returns ``None`` rather than 2000-01-01. A format with no year directive is checked against the year ``strptime`` defaults to, 1900, which is not a leap year, so "366" with ``date_formats=["%j"]`` now returns ``None`` where it used to return January 1 Cleanups and internal improvements: - Add CodSpeed benchmarks and a workflow that runs them, so a performance regression such as the quadratic backtracking fixed in 1.4.1 is reported on the pull request that introduces it
py-dateparser: updated to 1.4.2 1.4.2 (2026-08-04) New features: - Add an ``IGNORE_SURROUNDING_TEXT`` setting that, when enabled, retries parsing after ignoring the leading and trailing words the language does not recognize, so a date wrapped in extra text such as "Published on 16/04/2019" is parsed - Add a ``strategy`` argument to ``search_dates()`` to choose the search strategy: the default ``"split"`` keeps the current behavior, while the new ``"ngram"`` strategy parses the longest sequences of tokens as dates for more predictable results on noisy text Fixes: - Do not read a two-digit number as a year once a later component has been found in year-first date orders, so the day in Japanese dates such as "4月20日" is no longer consumed as the year - Parse ISO 8601 dates (those starting with a four-digit year) in month-day order even when an explicit day-first language such as ``it`` or ``fr`` is given, without needing to set ``PREFER_LOCALE_DATE_ORDER`` to ``False`` - Honor ``PREFER_DATES_FROM`` and ``RELATIVE_BASE`` when parsing with custom ``date_formats`` that use a two-digit year (``%y``) - Honor the ``%j`` (day of year) directive in ``date_formats`` instead of overwriting the parsed month and day with the current date Improvements: - Update the bundled CLDR locale data to 44.1.0, adding many newly recognized date forms across locales and a standalone hour/duration unit (e.g. Catalan "2 hores"), while keeping previously supported forms parseable - Add the Italian expressions "un ora fa" and "un'ora fa", and skip "alle" so phrases like "oggi alle 11:00" parse - Expand Czech date translations with month locative/dative forms (e.g. "v lednu 2023"), the July abbreviation "črv", and relative expressions such as "za týden", "za měsíc" and "za rok" - Specify the README header content as RST rather than raw HTML
py-dateparser: updated to 1.4.1 1.4.1 (2026-06-15) Breaking changes: - Remove fastText language detection support: the ``fasttext`` extra is dropped and ``detect_languages()`` now raises ``ImportError``. Migrate to the ``langdetect`` extra, which also unblocks ``numpy`` 2.x compatibility Security fixes: - Make digit quantifiers possessive in the relative-date regexes to prevent quadratic backtracking (ReDoS) on long digit runs New features: - Add the ``USE_GIVEN_LANGUAGE_ORDER`` setting to try ``languages`` and ``locales`` in the order given rather than by frequency Fixes: - Preserve explicit signs on individual components when parsing relative dates that combine decades with years, such as "-1 decade +2 years" - Fall back to other provided languages in ``search_dates`` when the detected language yields no dates - Parse relative date expressions with spaces between the sign and number, such as "now - 2 hours" and "now + 1 day" - Use the parser-relative ``now`` for the current month when filling in incomplete dates so the month and day stay consistent - Fix Norwegian Bokmål (``nb``) parsing of relative date expressions such as "3 måneder siden" and "om 2 måneder" - Parse abbreviated English month expressions such as "1mon ago" and "3mons ago" - Preserve surrounding whitespace when removing skip tokens during translation to avoid spurious double spaces Improvements: - Move project metadata and build configuration to ``pyproject.toml`` - Add alternative Korean date expressions for today, yesterday, tomorrow, and "N months ago/later" - Expand Czech date translations with additional inflections, word numbers, decade and century expressions, and clock phrases like "čtvrt na tři" - Replace internal ``OrderedDict`` usage with the built-in ``dict``
py-dateparser: updated to 1.4.0
1.4.0 (2026-03-26)
Security fixes:
- Remove import-time loading of timezone offset data from pickle to prevent
unsafe deserialization from packaged data
- Replace ``eval()`` use when parsing ``no_word_spacing`` with strict boolean
parsing to prevent code execution from locale metadata
New features:
- Add support for expressions like "N {interval} from now" in English
- Add support for the ``en-US`` locale
Fixes:
- Honor ``REQUIRE_PARTS`` for ambiguous month-number inputs by retrying with a
year-biased ``DATE_ORDER``
- Fix parsing word-number relative phrases such as "two days later"
- Allow md5hash to work in FIPS environments
Improvements:
- Add Bosnian Cyrillic (ijekavica) date translations
- Add a new browser-based demo to the project documentation
- Update installation documentation to replace ``setup.py install`` guidance
- Add a project security policy
py-dateparser: updated to 1.3.0 1.3.0 (2026-02-04) Dropped Python 3.9 support. New features: - ``search_dates()`` can now detect time spans from expressions like “past month”, “last week”, etc. For details, see the “Time Span Detection” section and the ``RETURN_TIME_SPAN``, ``DEFAULT_START_OF_WEEK`` and ``DEFAULT_DAYS_IN_MONTH`` settings in the documentation. Fixes: - Assume the current year if not specified - Support expressions like “yesterday +1h” - English: Support most 2-letter day-of-the-week names - English: Support “in N weeks' time” - Finnish: Support dates with “klo” - Russian: Support compound ordinals Cleanups and internal improvements: - Fixed year expectation issues in tests.
py-dateparser: updated to 1.2.2 1.2.2 (2025-06-26) Fixes: - Handle the Russian preposition “с” - Fix weekday search Improvements: - Add Python 3.14 support - Cache timezone offsets to improve import time
Fix PLIST after py-setuptools update; bump depends and revision
py-dateparser: updated to 1.2.1 1.2.1 (2025-02-05) Fixes: - Fix PytzUsageWarning - Fix date_parser with prefer_month_of_year wrong results - Fix skipped day when UTC and tz are different days Improvements: - Avoid repeated loop over timezones - Proofread README.rst - Check for derived types for configuration - Parse some abbreviated strings as relative dates - Migrate from hijri-converter to hijridate - Fixed ClusterFuzz build error by adding dateparser.data as a binary - Fix an issue detected by OSSFuzz - Support two-digit years in non-Gregorian calendars - Refactored CI to run extras separately and test minimum versions of dependencies, replaced flake8 with ruff, fixed tests - Set minimum versions for dependencies - Limited ``numpy`` to 1.x when installing ``dateparser[fasttext]``
py-dateparser: updated to 1.2.0 1.2.0 (2023-11-17) ------------------ New features: - New ``PREFER_MONTH_OF_YEAR`` setting Fixes: - Absolute years in Russian are no longer being treated as a number of years in the past Cleanups and internal improvements: - Removed the use of ``datetime.utcnow``, deprecated on Python 3.12 - Applied Black formatting to the code base - Initial integration with OSSFuzz - Extended test cases
py-dateparser: updated to 1.1.8 1.1.8 (2023-03-22) ------------------ Improvements: - Improved date parsing for Chinese - Improved date parsing for Czech - Reorder language by popularity - Fix leak of memory in cache - Add support for "\d units later" - Move modification in CLDR data to yaml - Add support to use timezone via settings to get PREFER_DATES_FROM result
py-dateparser: updated to 1.1.7 1.1.7 (2023-02-02) ------------------ Improvements: - Add an “ago” synonym for Arabic - Improved date parsing for Czech - Improved date parsing for Indonesian 1.1.6 (2023-01-12) ------------------ Improvements: - Fix the bug where Monday is parsed as a month - Prevent ReDoS in Spanish sentence splitting regex
py-dateparser: updated to 1.1.5 1.1.5 (2022-12-29) ------------------ Improvements: - Parse short versions of day, month, and year - Add a test for “in 1d” - Update languages_info - Add a workaround for zipimporter not having exec_module before Python 3.10 - Stabilize tests at midnight - Add a test case for French Cleanups: - Remove the requirements-build file
py-dateparser: updated to 1.1.4 1.1.4 (2022-11-21) ------------------ Improvements: - Improved support for languages such as Slovak, Indonesian, Hindi, German and Japanese - Recursively create a model home - Replace regex sub with simple string replace - Add Python 3.10, 3.11 support - Drop support for Python 3.5, 3.6 versions
py-dateparser: updated to 1.1.3 1.1.3 (2022-11-03) ------------------ New features: - Add support for fractional units Improvements: - Fix the returned datetime skipping a day with time+timezone input and PREFER_DATES_FROM = 'future' - Fix input translatation breaking keep_formatting - English: support "till date" - English: support “after” and “before” in relative dates Cleanups: - Reorganize internal data - CI updates
py-dateparser: updated to 1.1.2 1.1.2 (2022-10-20) ------------------ Improvements: - Added support for negative timestamp - Fixed PytzUsageWarning for Python versions >= 3.6 - Added support for dates with dots and spaces - Improved support for Ukrainian, Croatian and Russian - Added support for parsing Unix timestamps consistently regardless of timezones - Improved tests
py-dateparser: unrestrict py-regex dependency Bump PKGREVISION.
py-dateparser: updated to 1.1.1 1.1.1 (2022-03-17) ------------------ Improvements: - Fixed issue with regex library by pinning dependencies to an earlier version. - Extended support for Russian language dates starting with lowercase. - Allowed to use_given_order for languages too. - Fixed link to settings section. - Defined UTF-8 encoding for Windows. - Fixed directories creation error in CLI utils. 1.1.0 (2021-10-04) ------------------ New features: * Support language detection based on ``langdetect``, ``fastText``, or a custom implementation * Add support for 'by <time>' * Sort default language list by internet usage Improvements: * Improved support of Chinese, Czech * Improvements in ``search_dates`` * Make order of previous locales deterministic * Fix parsing with trailing space * Consider ``RETURN_TIME_AS_PERIOD`` for timestamp times * Exclude failing regex version * Ongoing work multithreading support * Add demo URL QA: * Migrate pipelines from Travis CI to Github Actions * Use versioned CLDR data * Add a script to update table of supported languages and locales * Sort 'skip' keys in yaml files * Improve test coverage * Code cleanup 1.0.0 (2020-10-29) ------------------ Breaking changes: * Drop support for Python 2.7 and pypy * Now ``DateDataParser.get_date_data()`` returns a ``DateData`` object instead of a ``dict`` * From now wrong ``settings`` are not silenced and raise ``SettingValidationError`` * Now ``dateparser.parse()`` is deterministic and doesn't try previous locales. Also, ``DateDataParser.get_date_data()`` doesn't try the previous locales by default * Remove the ``'base-formats'`` parser * Extract the ``'no-spaces-time'`` parser from the ``'absolute-time'`` parser and make it an optional parser * Remove ``numeral_translation_data`` * Remove the undocumented ``SKIP_TOKENS_PARSER`` and ``FUZZY`` settings * Remove support for using strings in ``date_formats`` * The undocumented ``ExactLanguageSearch`` class has been moved to the private scope and some internal methods have changed * Changes in ``dateparser.utils``: ``normalize_unicode()`` doesn't accept ``bytes`` as input and ``convert_to_unicode`` has been deprecated New features: * Add Python 3.9 support * Detect hours separated with a period/dot * Add support for "decade" * Add support for the hijri calendar in Python ≥ 3.6 Improvements: * New logo! * Improve the README and docs * Fix the "calendars" extra * Fix leap years when ``PREFER_DATES_FROM`` is set * Fix ``STRICT_PARSING`` setting in ``no-spaces-time`` parser * Consider ``RETURN_AS_TIME_PERIOD`` setting for ``relative-time`` parser * Parse the 24hr time format with meridian info * Other small improvements
*: bump PKGREVISION for egg.mk users They now have a tool dependency on py-setuptools instead of a DEPENDS
py-dateparser: updated to 0.7.6 0.7.6: Improvements: * Rename ``scripts`` to ``dateparser_scripts`` to avoid name collisions with modules from other packages or projects 0.7.5: New features: * Add Python 3.8 support * Implement a ``REQUIRE_PARTS`` setting * Add support for subscript and superscript numbers * Extended French support * Extended German support Improvements: * Migrate test suite to Pytest * Add test to check the `yaml` and `json` files content * Add flake8 pipeline with pytest-flake8 * Add partial support for 8-digit dates without separators * Fix possible ``OverflowError`` errors and explicitly avoid to raise ``ValueError`` when parsing relative dates * Fix double-digit GMT and UTC parsing * Fix bug when using ``DATE_ORDER`` * Fix bug when parsing relative time with timezone * Fix milliseconds parsing * Fix wrong values to be interpreted as ``'future'`` in ``PREFER_DATES_FROM`` * Other small improvements
py-dateparser: updated to 0.7.4 0.7.4: Improvements: * Fixed Python 2.7 tests 0.7.3: New features: * Extended Norwegian support * Implement a PARSERS setting Improvements: * Add support for `PREFER_DATES_FROM` in relative/freshness parser * Add support for `PREFER_DAY_OF_MONTH` in base-formats parser * Added UTC -00:00 as a valid offset * Fix support for “one” * Fix TypeError when parsing some invalid dates * Fix tokenizer for non recognized characters * Prevent installing regex 2019.02.19 * Resolve DeprecationWarning related to raw string escape sequences * Implement a tox environment to build the documentation * Improve tests stability * Documentation improvements * Performance improvements
py-dateparser: updated to 0.7.2 0.7.2: Features: * Extended Czech support * Added `time` to valid periods * Added timezone information to dates found with `search_dates()` * Support strings as date formats Improvements: * Fixed Collections ABCs depreciation warning * Fixed dates with trailing colons not being parsed * Fixed date format override on any settings change * Fixed parsing current weekday as past date, regardless of settings * Added UTC -2:30 as a valid offset * Added Python 3.7 to supported versions, dropped support for Python 3.3 and 3.4 * Moved to importlib from imp where possible * Improved support for Catalan * Documentation improvements
py-dateparser: updated to 0.7.1 0.7.1: Features/news: Added detected language to return value of search_dates() Performance improvements Refreshed versions of dependencies Improvements: Fixed unpickleable DateTime objects with timezones Fixed regex pattern to avoid new behaviour of re.split in Python 3.7 Fixed an exception thrown when parsing colons Fixed tests failing on days with number greater than 30 Fixed ZeroDivisionError exceptions
py-dateparser: updated to 0.7.0 0.7.0: Features added during Google Summer of Code 2017: * Harvesting language data from Unicode CLDR database (https://github.com/unicode-cldr/cldr-json), which includes over 200 locales See full currently supported locale list in README. * Extracting dates from longer strings of text Special thanks for their awesome contributions! New features: * Added (independently from CLDR) Georgian and Swedish Improvements: * Improved support of Chinese, Thai, French, Russian * Removed ruamel.yaml from dependencies. This should reduce the number of installation issues and improve performance as the result of moving away from YAML as basic data storage format. Note that YAML is still used as format for support language files. * Improved performance through using pre-compiling frequent regexes and lazy loading of data * Extended tests * Updated nose_parameterized to its current package, parameterized
Add py-dateparser-0.6.0: dateparser provides modules to easily parse localized dates in almost any string formats commonly found on web pages.