{"id":44719513,"url":"https://github.com/hashadex/naturaldateinput","last_synced_at":"2026-02-15T15:21:14.914Z","repository":{"id":338099197,"uuid":"927772156","full_name":"hashadex/naturaldateinput","owner":"hashadex","description":"Java library for parsing human, natural language dates","archived":false,"fork":false,"pushed_at":"2026-02-12T20:34:05.000Z","size":278,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-13T03:59:36.057Z","etag":null,"topics":["date","natural-language","parser","time","todoist"],"latest_commit_sha":null,"homepage":"","language":"Java","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/hashadex.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":"2025-02-05T14:18:30.000Z","updated_at":"2026-02-12T20:31:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hashadex/naturaldateinput","commit_stats":null,"previous_names":["hashadex/naturaldateinput"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hashadex/naturaldateinput","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashadex%2Fnaturaldateinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashadex%2Fnaturaldateinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashadex%2Fnaturaldateinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashadex%2Fnaturaldateinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashadex","download_url":"https://codeload.github.com/hashadex/naturaldateinput/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashadex%2Fnaturaldateinput/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29480864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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","natural-language","parser","time","todoist"],"created_at":"2026-02-15T15:21:14.334Z","updated_at":"2026-02-15T15:21:14.908Z","avatar_url":"https://github.com/hashadex.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# naturaldateinput\n\nJava library for parsing human, natural language dates, inspired by\n[Chrono.js](https://github.com/wanasit/chrono/) and Todoist's smart date recognition.\n\n[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.hashadex.naturaldateinput/naturaldateinput?label=maven%20central)](https://central.sonatype.com/artifact/io.github.hashadex.naturaldateinput/naturaldateinput)\n\nThis library supports the parsing of various date formats and expressions:\n\n* `2025-08-04` / `04.08.2025` / `8/4/2025`\n* `18:00` / `6:00 pm`\n* `in three days`\n* `4th of August, 2025` / `August 4th, 2025` / `2025 August 4`\n* `tomorrow` / `today` / `yesterday`\n* `noon` / `morning` etc.\n* `next friday`\n\nCurrently, the only supported languages are English and Russian.\n\n## Installation\n\n### Maven\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.hashadex.naturaldateinput\u003c/groupId\u003e\n    \u003cartifactId\u003enaturaldateinput\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n\u003c!-- markdownlint-disable MD040 --\u003e\n```\nimplementation 'io.github.hashadex.naturaldateinput:naturaldateinput:1.0.0'\n```\n\n## Usage\n\n\u003e [!TIP]\n\u003e API documentation is available on [GitHub Pages](https://hashadex.github.io/naturaldateinput/apidocs/).\n\nSimply load a pre-made `ParsingConfiguration` and use the `parse` method:\n\n```java\n// Create ParsingConfiguration and set the preferred day-month order for parsing\n// ambiguous dates like 10/12/2025\nParsingConfiguration conf = new ENParsingConfiguration(DayMonthOrder.DAY_MONTH);\n\nParseResult result = conf.parse(\"Meeting tomorrow at 5 pm\");\n\nSystem.out.println(result.date().get()); // -\u003e 2025-08-05\nSystem.out.println(result.time().get()); // -\u003e 17:00\n```\n\nA `ParsingConfiguration` is a set of multiple `Parser`s, and a `Parser` is a tool\nthat handles the parsing of one date/time format. You can use a single `Parser`\ndirectly if you wish to parse only one format:\n\n```java\nENWeekdayParser parser = new ENWeekdayParser();\n\nStream\u003cParsedComponent\u003e results = parser.parse(\"Due on friday\");\nParsedComponent result = results.findAny().get();\n\nSystem.out.println(result.text()); // -\u003e \"on friday\"\nSystem.out.println(result.date().get()) // -\u003e 2025-08-08\n```\n\nYou can easily create your own `ParsingConfiguration`s by extending the abstract\n`ParsingConfiguration` class:\n\n```java\nclass CustomConfiguration extends ParsingConfiguration {\n    public CustomConfiguration() {\n        super(\n            Set.of(\n                new ENDayMonthYearParser(),\n                new ENMonthDayYearParser(),\n                new ENYearMonthDayParser()\n            )\n        );\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashadex%2Fnaturaldateinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashadex%2Fnaturaldateinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashadex%2Fnaturaldateinput/lists"}