{"id":43792069,"url":"https://github.com/carmo-evan/strtotime","last_synced_at":"2026-02-05T20:30:58.459Z","repository":{"id":120538821,"uuid":"211756130","full_name":"carmo-evan/strtotime","owner":"carmo-evan","description":"A golang implementation of strtotime","archived":false,"fork":false,"pushed_at":"2020-01-08T20:31:56.000Z","size":55,"stargazers_count":57,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-18T20:15:06.780Z","etag":null,"topics":["golang","golang-library","golang-wrapper","php","strtotime"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carmo-evan.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}},"created_at":"2019-09-30T02:04:10.000Z","updated_at":"2024-06-18T19:29:46.000Z","dependencies_parsed_at":"2023-06-18T12:30:35.244Z","dependency_job_id":null,"html_url":"https://github.com/carmo-evan/strtotime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carmo-evan/strtotime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmo-evan%2Fstrtotime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmo-evan%2Fstrtotime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmo-evan%2Fstrtotime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmo-evan%2Fstrtotime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carmo-evan","download_url":"https://codeload.github.com/carmo-evan/strtotime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmo-evan%2Fstrtotime/sbom","scorecard":{"id":266478,"data":{"date":"2025-08-11","repo":{"name":"github.com/carmo-evan/strtotime","commit":"3136cf889e3b74ea7b03d143e07ec5d61aaeacbc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"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":-1,"reason":"No tokens found","details":null,"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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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 2/17 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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"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":"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 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"}}]},"last_synced_at":"2025-08-17T12:10:38.341Z","repository_id":120538821,"created_at":"2025-08-17T12:10:38.341Z","updated_at":"2025-08-17T12:10:38.341Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29133395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T19:36:52.185Z","status":"ssl_error","status_checked_at":"2026-02-05T19:35:40.941Z","response_time":65,"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":["golang","golang-library","golang-wrapper","php","strtotime"],"created_at":"2026-02-05T20:30:57.833Z","updated_at":"2026-02-05T20:30:58.452Z","avatar_url":"https://github.com/carmo-evan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n\n# strtotime\n\n![Image of PHP mascot being switched by Golang mascot](https://i.imgur.com/8RhHjkD.jpg)\n\nGolang implementation of `strtotime`, a very popular PHP function for converting English text to a timestamp. This is an exercise inspired on [this](https://github.com/kvz/locutus/blob/master/src/php/datetime/strtotime.js) Javascript implementation.\n\n## Installation\n\n`strtotime` uses Go modules and is compatible with Go 1.12 upwards. Install using `go get`.\n\n```\ngo get github.com/carmo-evan/strtotime\n```\n\nAfter importing it, the `strtotime` package will expose only one method: `Parse`. It takes two arguments - an English string describing some point in time; and a unix timestamp that should represent the current time, or another referencial point in time you want to use. \n\nTry it on [the playground](https://play.golang.org/p/k3RqaQy7CB-).\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/carmo-evan/strtotime\"\n\t\"time\"\n)\n\nfunc main() {\n    //Now is Nov 17, 2019\n    u, err := strtotime.Parse(\"next Friday 3pm\", time.Now().Unix())\n    \n    if err != nil {\n        // crash and burn\n    }\n\n    t := time.Unix(u,0)\n    \n    fmt.Println(t)\n    //output: 2019-11-22 15:00:00 +0000 UTC\n}\n```\n\n## Supported Formats\n\n- [x] yesterday\n- [x] now\n- [x] noon\n- [x] midnightOrToday\n- [x] tomorrow\n- [x] timestamp\n- [x] firstOrLastDay\n- [x] backOrFrontOf (Thank you [evalevanto!](https://github.com/evalevanto))\n- [ ] weekdayOf\n- [x] mssqltime\n- [x] timeLong12\n- [x] timeShort12\n- [x] timeTiny12\n- [x] soap\n- [x] wddx\n- [x] exif\n- [x] xmlRpc\n- [x] xmlRpcNoColon\n- [x] clf\n- [x] iso8601long\n- [x] dateTextual\n- [x] pointedDate4\n- [x] pointedDate2\n- [x] timeLong24\n- [x] dateNoColon\n- [x] pgydotd\n- [x] timeShort24\n- [x] iso8601noColon\n- [x] dateSlash\n- [x] american\n- [x] americanShort\n- [x] gnuDateShortOrIso8601date2\n- [x] iso8601date4\n- [x] gnuNoColon\n- [x] gnuDateShorter\n- [x] pgTextReverse\n- [x] dateFull\n- [x] dateNoDay\n- [x] dateNoDayRev\n- [x] pgTextShort\n- [x] dateNoYear\n- [x] dateNoYearRev\n- [x] isoWeekDay\n- [x] relativeText\n- [x] relative\n- [x] dayText\n- [x] relativeTextWeek\n- [x] monthFullOrMonthAbbr\n- [x] tzCorrection\n- [x] ago\n- [x] gnuNoColon2\n- [x] year4\n- [x] whitespace\n\n### Author\n\nBy [Evan do Carmo](https://github.com/carmo-evan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarmo-evan%2Fstrtotime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarmo-evan%2Fstrtotime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarmo-evan%2Fstrtotime/lists"}