{"id":46905616,"url":"https://github.com/connected-web/guessdate-en","last_synced_at":"2026-03-11T01:10:10.689Z","repository":{"id":42125864,"uuid":"116022962","full_name":"connected-web/guessdate-en","owner":"connected-web","description":"Guess an english date string, returns a javascript date object","archived":false,"fork":false,"pushed_at":"2023-01-08T18:30:15.000Z","size":572,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-24T00:54:46.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/connected-web.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-02T14:21:02.000Z","updated_at":"2022-04-12T17:42:57.000Z","dependencies_parsed_at":"2023-02-08T07:01:40.946Z","dependency_job_id":null,"html_url":"https://github.com/connected-web/guessdate-en","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/connected-web/guessdate-en","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connected-web%2Fguessdate-en","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connected-web%2Fguessdate-en/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connected-web%2Fguessdate-en/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connected-web%2Fguessdate-en/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/connected-web","download_url":"https://codeload.github.com/connected-web/guessdate-en/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connected-web%2Fguessdate-en/sbom","scorecard":{"id":302619,"data":{"date":"2025-08-11","repo":{"name":"github.com/connected-web/guessdate-en","commit":"8a74464fbe3a545be6a81f86157dfd80073284a9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/connected-web/guessdate-en/pr-check.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/connected-web/guessdate-en/pr-check.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/pr-check.yml:22","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 1/10 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pr-check.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T21:06:52.775Z","repository_id":42125864,"created_at":"2025-08-17T21:06:52.775Z","updated_at":"2025-08-17T21:06:52.775Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30365050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"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":[],"created_at":"2026-03-11T01:10:10.228Z","updated_at":"2026-03-11T01:10:10.666Z","avatar_url":"https://github.com/connected-web.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guess Date (EN)\n\nReturns a javascript `Date` object from an english date string.\n\n```js\nguessDate('April 31st after lunch')\nguessDate('Thursday at 5:15pm')\nguessDate('January 2018')\n```\n\n## Usage\n\n### Node JS\n\nAdd to your node js project:\n```sh\nnpm i --save guessdate-en\n```\n\nThen:\n```js\nconst guessDate = require('guessdate-en')\nconst date = guessDate('April 31st after lunch')\nconsole.log('Guesed date: ' + date)\n```\n\n### Web / HTML\n\nInclude using our CDN link, or copy `guess-date.js` into your project:\n```html\n\u003c!DOCTYPE HTML\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n  \u003ctitle\u003eGuess Date (EN) Example\u003c/title\u003e\n  \u003cscript src=\"https://cdn.rawgit.com/connected-web/guessdate-en/1.0.2/src/guess-date.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n    document.write('Next Monday at 6:20pm', guessDate('Next Monday at 6:20pm'))\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## API\n\n### `guessDate(inputString)`\n\n- `inputString`: the natural language string to guess a date and time from, relative to `Date.now()`\n\n`returns` a javascript `Date` object\n\n### `guessDate(dateContext, inputString)`\n\n- `dateContext`: a `Date` object from which to apply the guess to, defaults to `Date.now()`\n- `inputString`: the natural language string to guess a date and time from\n\n`returns` a javascript `Date` object\n\n## Examples\n\n```js\n// The following tests assume this as the reference date\nconst now = new Date('Sun Feb 12 2017 23:08:56 GMT+0000 (GMT)')\n```\n\n### Empty Input\n\n```js\nguessDate(now, '')                         // Sun, 12 Feb 2017 23:08:56 GMT\n```\n\n### Database Years\n\n```js\nguessDate(now, '2015-05-25')               // Mon, 25 May 2015 08:00:00 GMT\n```\n\n### Day of Week Matchers\n\n```js\nguessDate(now, 'Next sunday')              // Sun, 19 Feb 2017 08:00:00 GMT\nguessDate(now, 'on Monday')                // Mon, 13 Feb 2017 08:00:00 GMT\nguessDate(now, 'Tues')                     // Tue, 14 Feb 2017 08:00:00 GMT\nguessDate(now, 'wednesday')                // Wed, 15 Feb 2017 08:00:00 GMT\nguessDate(now, 'thursda')                  // Thu, 16 Feb 2017 08:00:00 GMT\nguessDate(now, 'Fri')                      // Fri, 17 Feb 2017 08:00:00 GMT\nguessDate(now, 'Satur')                    // Sat, 18 Feb 2017 08:00:00 GMT\nguessDate(now, 'Sun')                      // Sun, 19 Feb 2017 08:00:00 GMT\n```\n\n### Time of day strings\n\n```js\nguessDate(now, 'evening')                  // Sun, 12 Feb 2017 18:00:00 GMT\nguessDate(now, 'Monday evenig')            // Mon, 13 Feb 2017 18:00:00 GMT\nguessDate(now, 'Friday eve')               // Fri, 17 Feb 2017 18:00:00 GMT\nguessDate(now, 'morning')                  // Sun, 12 Feb 2017 08:00:00 GMT\nguessDate(now, 'Monday morn')              // Mon, 13 Feb 2017 08:00:00 GMT\nguessDate(now, 'Friday mornin')            // Fri, 17 Feb 2017 08:00:00 GMT\nguessDate(now, 'afternoon')                // Sun, 12 Feb 2017 13:00:00 GMT\nguessDate(now, 'Monday afternoon')         // Mon, 13 Feb 2017 13:00:00 GMT\nguessDate(now, 'Friday noon')              // Fri, 17 Feb 2017 12:00:00 GMT\nguessDate(now, 'Friday midday')            // Fri, 17 Feb 2017 12:00:00 GMT\n```\n\n### Month of year strings\n\n```js\nguessDate(now, 'Jan')                      // Mon, 01 Jan 2018 08:00:00 GMT\nguessDate(now, 'Febru evenig')             // Wed, 01 Feb 2017 18:00:00 GMT\nguessDate(now, 'March eve')                // Wed, 01 Mar 2017 18:00:00 GMT\nguessDate(now, 'April')                    // Sat, 01 Apr 2017 08:00:00 GMT\nguessDate(now, 'May eve')                  // Mon, 01 May 2017 18:00:00 GMT\nguessDate(now, 'June morn')                // Thu, 01 Jun 2017 08:00:00 GMT\nguessDate(now, 'July mornin')              // Sat, 01 Jul 2017 08:00:00 GMT\nguessDate(now, 'August mornin')            // Tue, 01 Aug 2017 08:00:00 GMT\nguessDate(now, 'Sept eve')                 // Fri, 01 Sep 2017 18:00:00 GMT\nguessDate(now, 'September 15th eve')       // Fri, 15 Sep 2017 18:00:00 GMT\nguessDate(now, 'September 15th eve')       // Fri, 15 Sep 2017 18:00:00 GMT\nguessDate(now, 'October mornin')           // Sun, 01 Oct 2017 08:00:00 GMT\nguessDate(now, 'November mornin')          // Wed, 01 Nov 2017 08:00:00 GMT\nguessDate(now, 'December eve')             // Fri, 01 Dec 2017 18:00:00 GMT\n```\n\n### Tomorrow\n\n```js\nguessDate(now, 'tomorrow')                 // Mon, 13 Feb 2017 08:00:00 GMT\nguessDate(now, 'tomorrow after work')      // Mon, 13 Feb 2017 17:00:00 GMT\nguessDate(now, 'tomorrow before lunch')    // Mon, 13 Feb 2017 11:00:00 GMT\nguessDate(now, 'tomorrow at 8am')          // Mon, 13 Feb 2017 08:00:00 GMT\n```\n\n### After points in time\n\n```js\nguessDate(now, 'Monday after breakfast')   // Mon, 13 Feb 2017 07:00:00 GMT\nguessDate(now, 'Tuesday after work')       // Tue, 14 Feb 2017 17:00:00 GMT\nguessDate(now, 'Wednesday after lunch')    // Wed, 15 Feb 2017 13:00:00 GMT\nguessDate(now, 'Thursday after school')    // Thu, 16 Feb 2017 16:00:00 GMT\n```\n\n### Before points in time\n\n```js\nguessDate(now, 'Monday before breakfast')  // Mon, 13 Feb 2017 06:00:00 GMT\nguessDate(now, 'Tuesday before work')      // Tue, 14 Feb 2017 07:00:00 GMT\nguessDate(now, 'Wednesday before lunch')   // Wed, 15 Feb 2017 11:00:00 GMT\nguessDate(now, 'Thursday before school')   // Thu, 16 Feb 2017 07:00:00 GMT\n```\n\n### Dates in month\n\n```js\nguessDate(now, '24th')                     // Fri, 24 Feb 2017 08:00:00 GMT\nguessDate(now, '26th')                     // Sun, 26 Feb 2017 08:00:00 GMT\nguessDate(now, 'evening of the 30th')      // Thu, 02 Mar 2017 18:00:00 GMT\nguessDate(now, 'January 1st')              // Mon, 01 Jan 2018 08:00:00 GMT\nguessDate(now, 'May 21st')                 // Sun, 21 May 2017 08:00:00 GMT\nguessDate(now, '1st February')             // Wed, 01 Feb 2017 08:00:00 GMT\nguessDate(now, '2nd February after lunch') // Thu, 02 Feb 2017 13:00:00 GMT\nguessDate(now, '1st March')                // Wed, 01 Mar 2017 08:00:00 GMT\nguessDate(now, '23rd August')              // Wed, 23 Aug 2017 08:00:00 GMT\nguessDate(now, '4pm on the 25th March')    // Sat, 25 Mar 2017 16:00:00 GMT\nguessDate(now, 'March 25th at 2am')        // Sat, 25 Mar 2017 02:00:00 GMT\nguessDate(now, 'Sat May 27, 2017')         // Sat, 27 May 2017 08:00:00 GMT\n```\n\n### Year\n\n```js\nguessDate(now, 'May 27, 2018')             // Sun, 27 May 2018 08:00:00 GMT\nguessDate(now, 'May 27, 2016')             // Fri, 27 May 2016 08:00:00 GMT\nguessDate(now, 'January 2018')             // Mon, 01 Jan 2018 08:00:00 GMT\n```\n\n### Time in day\n\n```js\nguessDate(now, '11:23')                    // Sun, 12 Feb 2017 11:23:00 GMT\nguessDate(now, '11am')                     // Sun, 12 Feb 2017 11:00:00 GMT\nguessDate(now, '11pm')                     // Sun, 12 Feb 2017 23:00:00 GMT\nguessDate(now, '15:59')                    // Sun, 12 Feb 2017 15:59:00 GMT\nguessDate(now, '5:15am')                   // Sun, 12 Feb 2017 05:15:00 GMT\nguessDate(now, '5:45pm')                   // Sun, 12 Feb 2017 17:45:00 GMT\nguessDate(now, '20:15')                    // Sun, 12 Feb 2017 20:15:00 GMT\nguessDate(now, '25:05')                    // Mon, 13 Feb 2017 01:05:00 GMT\nguessDate(now, '21:03:30')                 // Sun, 12 Feb 2017 21:03:30 GMT\n```\n\n### Mixed date and time\n\n```js\nguessDate(now, '6th December 2017 20:15')  // Wed, 06 Dec 2017 20:15:00 GMT\n```\n\n### Specific problematic dates\n\n```js\nguessDate(now, 'Sept 1')                   // Wed, 01 Sep 2021 08:00:00 GMT\nguessDate(now, 'Sept 4')                   // Sat, 04 Sep 2021 08:00:00 GMT\nguessDate(now, 'Sat')                      // Sat, 04 Sep 2021 08:00:00 GMT\nguessDate(now, 'April 2nd')                // Sat, 02 Apr 2022 08:00:00 GMT\n```\n\n## Contributors\n\n- John Beech (@johnbeech) (Connected Web) - original design and release of library, maintainer\n- Jeroen Akkerman (@Ionaru) - fixes to specific date problems\n\n## Contributing\n\nIf you discover any problematic dates, or have suggestions for improvements - please raise an issue or a pull request against this repo.\n\n## License\n\nReleased under [ISC](https://choosealicense.com/licenses/isc/) license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnected-web%2Fguessdate-en","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnected-web%2Fguessdate-en","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnected-web%2Fguessdate-en/lists"}