{"id":15502872,"url":"https://github.com/craigtrim/fast-parse-time","last_synced_at":"2026-03-01T07:34:42.781Z","repository":{"id":140014317,"uuid":"523592941","full_name":"craigtrim/fast-parse-time","owner":"craigtrim","description":"A fast and efficient English NLP Parser for Time References in Text","archived":false,"fork":false,"pushed_at":"2026-02-18T04:15:01.000Z","size":2360,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-18T04:52:36.048Z","etag":null,"topics":["date-parsing","datetime-parser","temporal-expressions","text-to-date","time-extraction"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craigtrim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-11T05:09:21.000Z","updated_at":"2026-02-18T04:15:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"42153a11-f23a-4619-a6b4-bf9e44f3bbf2","html_url":"https://github.com/craigtrim/fast-parse-time","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"5e8f6b37ccfed91db04a7e544af812187cbabc41"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/craigtrim/fast-parse-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigtrim%2Ffast-parse-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigtrim%2Ffast-parse-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigtrim%2Ffast-parse-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigtrim%2Ffast-parse-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craigtrim","download_url":"https://codeload.github.com/craigtrim/fast-parse-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigtrim%2Ffast-parse-time/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29964180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date-parsing","datetime-parser","temporal-expressions","text-to-date","time-extraction"],"created_at":"2024-10-02T09:11:25.914Z","updated_at":"2026-03-01T07:34:42.773Z","avatar_url":"https://github.com/craigtrim.png","language":"Python","readme":"# fast-parse-time\n\n[![PyPI version](https://img.shields.io/pypi/v/fast-parse-time.svg)](https://pypi.org/project/fast-parse-time/)\n[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://pypi.org/project/fast-parse-time/)\n[![Downloads](https://pepy.tech/badge/fast-parse-time)](https://pepy.tech/project/fast-parse-time)\n[![Downloads](https://pepy.tech/badge/fast-parse-time/month)](https://pepy.tech/project/fast-parse-time)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Tests](https://img.shields.io/badge/tests-8560-brightgreen.svg)](https://github.com/craigtrim/fast-parse-time/tree/master/tests)\n\nExtract dates and times from text. Fast, deterministic, zero cost.\n\n## Why?\n\nLLMs can parse dates, but they're slow, expensive, and non-deterministic. This library gives you:\n\n- **Sub-millisecond performance** - Process thousands of documents per second\n- **Zero API costs** - No per-request charges\n- **Deterministic results** - Same input always produces same output\n- **Simple API** - One function call, everything extracted\n\n## Install\n\n```bash\npip install fast-parse-time\n```\n\n## Usage\n\n```python\nfrom fast_parse_time import parse_dates\n\ntext = \"Meeting on 04/08/2024 to discuss issues from 5 days ago\"\nresult = parse_dates(text)\n\n# Explicit dates found in text\nprint(result.explicit_dates)\n# [ExplicitDate(text='04/08/2024', date_type='FULL_EXPLICIT_DATE')]\n\n# Relative time expressions\nprint(result.relative_times)\n# [RelativeTime(cardinality=5, frame='day', tense='past')]\n\n# Convert to Python datetime\nfor time_ref in result.relative_times:\n    print(time_ref.to_datetime())\n    # datetime.datetime(2025, 11, 14, ...)\n```\n\n## What It Extracts\n\n**Explicit dates:**\n```python\n\"Event on 04/08/2024\"          → 04/08/2024 (full date)\n\"Meeting scheduled for 3/24\"   → 3/24 (month/day)\n\"Copyright 2024\"               → 2024 (year only)\n\"Ambiguous: 4/8\"               → 4/8 (flagged as ambiguous)\n\"Published March 15, 2024\"     → March 15, 2024 (written month)\n\"Filed in 2024\"                → 2024 (year in prose)\n```\n\n**Year ranges:**\n```python\n\"Active 2014-2015\"             → 2014-2015 (year range)\n\"From 2010 to 2020\"           → From 2010 to 2020 (year range)\n\"Revenue grew 2019–2023\"      → 2019-2023 (en/em dash normalized)\n\"Contract 2023-24\"            → 2023-24 (abbreviated)\n```\n\n**Relative times:**\n```python\n\"5 days ago\"                   → 5 days (past)\n\"last couple of weeks\"         → 2 weeks (past)\n\"30 minutes ago\"               → 30 minutes (past)\n\"half an hour ago\"             → 1 hour (past)\n\"a few days ago\"               → 3 days (past)\n```\n\n## Examples\n\n### Parse everything at once\n\n```python\nresult = parse_dates(\"Report from 04/08/2024 covering issues from last week\")\n\nresult.explicit_dates  # ['04/08/2024']\nresult.relative_times  # [RelativeTime(cardinality=1, frame='week', tense='past')]\n```\n\n### Just get dates\n\n```python\nfrom fast_parse_time import extract_explicit_dates\n\ndates = extract_explicit_dates(\"Event on 04/08/2024 or maybe 3/24\")\n# {'04/08/2024': 'FULL_EXPLICIT_DATE', '3/24': 'MONTH_DAY'}\n```\n\n### Convert to datetime objects\n\n```python\nfrom fast_parse_time import resolve_to_datetime\n\ndatetimes = resolve_to_datetime(\"Show me data from 5 days ago\")\n# [datetime.datetime(2025, 11, 14, ...)]\n```\n\n## Features\n\n- Multiple date formats: `04/08/2024`, `3/24`, `2024-06-05`, `March 15, 2024`\n- Multiple delimiters: `/`, `-`, `.`\n- Year ranges: `2014-2015`, `2010 to 2020`, `from 2018 through 2022`, `2023-24`\n- Unicode normalization: en dash, em dash, and other hyphen variants accepted automatically\n- Written months: `March 15, 2024`, `Mar 15, 2024`, `15 March 2024`\n- Year-only in prose: `Copyright 2024`, `filed in 2019`\n- Relative time expressions: \"5 days ago\", \"last week\", \"couple of months ago\"\n- Informal expressions: \"half an hour ago\", \"a few days ago\", \"several weeks ago\"\n- Named day and time-of-day references: \"last Monday\", \"this morning\", \"yesterday\"\n- Ambiguity detection: Flags dates like `4/8` that could be April 8 or August 4\n- Time frame support: seconds, minutes, hours, days, weeks, months, years\n\n## Documentation\n\n- [API Reference](https://github.com/craigtrim/fast-parse-time/blob/master/docs/API.md)\n- [Functions](https://github.com/craigtrim/fast-parse-time/blob/master/docs/functions.md) - All functions with examples\n- [Types](https://github.com/craigtrim/fast-parse-time/blob/master/docs/types.md) - Data classes and DateType enum\n- [System Boundaries](https://github.com/craigtrim/fast-parse-time/blob/master/BOUNDARIES.md) - Design decisions and limitations\n\n## Performance\n\nTypical extraction takes \u003c 1ms per document. No network calls, no model inference, pure Python.\n\n## License\n\nMIT - See [LICENSE](LICENSE) for details.\n\n## Author\n\n**Craig Trim** - [craigtrim@gmail.com](mailto:craigtrim@gmail.com)\n\n---\n\n[Report Issues](https://github.com/craigtrim/fast-parse-time/issues) | [API Docs](https://github.com/craigtrim/fast-parse-time/blob/master/docs/API.md) | [PyPI](https://pypi.org/project/fast-parse-time/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigtrim%2Ffast-parse-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraigtrim%2Ffast-parse-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigtrim%2Ffast-parse-time/lists"}