{"id":17875958,"url":"https://github.com/bnjjj/gomoment","last_synced_at":"2026-01-20T07:32:36.151Z","repository":{"id":57518058,"uuid":"85231652","full_name":"bnjjj/gomoment","owner":"bnjjj","description":"A golang package to parse text that contain date or moment in french into a golang time struct","archived":false,"fork":false,"pushed_at":"2017-03-16T20:45:27.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T11:56:02.687Z","etag":null,"topics":["date-parser","french","golang","parser"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/bnjjj.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}},"created_at":"2017-03-16T18:58:48.000Z","updated_at":"2024-07-09T09:49:57.000Z","dependencies_parsed_at":"2022-09-26T18:01:35.957Z","dependency_job_id":null,"html_url":"https://github.com/bnjjj/gomoment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bnjjj/gomoment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnjjj%2Fgomoment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnjjj%2Fgomoment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnjjj%2Fgomoment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnjjj%2Fgomoment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bnjjj","download_url":"https://codeload.github.com/bnjjj/gomoment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnjjj%2Fgomoment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: 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-parser","french","golang","parser"],"created_at":"2024-10-28T11:26:19.527Z","updated_at":"2026-01-20T07:32:36.136Z","avatar_url":"https://github.com/bnjjj.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/bnjjj/gomoment?status.svg)](http://godoc.org/github.com/bnjjj/gomoment)\n[![Build Status](https://travis-ci.org/bnjjj/gomoment.svg?branch=master)](https://travis-ci.org/bnjjj/gomoment)\n# gomoment\n\n_gomoment_ is a golang package to parse text that contain date or moment in french into a golang time struct\n\n## Getting started\n\nTo use gomoment there is only 1 public function called GetDate, here is some examples:\n\n```golang\nfunc GetDate(moment string, duration bool, location *time.Location) (time.Time, time.Time, error)\n```\n\n+ Example for a simple moment date\n\n```golang\nbegin, _, err := GetDate(\"Donne moi la date d'aujourd'hui\", false, nil)\n// begin is the date of today 0h0min\n```\n\n\n+ Other examples for duration\n\n```golang\nbegin, end, err := GetDate(\"Combien de km j'ai réalisé depuis le mois dernier ?\", true, nil)\n// begin is today - 1 month and end is today 00:00\n```\n\n+ Example with another location\n\n```golang\nlocation, _ := time.LoadLocation(\"America/New_York\")\nbegin, end, err := GetDate(\"Combien de km j'ai réalisé hier ?\", true, location)\n```\n\n## Examples of text date that *gomoment* can parse\n\n\n+ `avant-hier ?`\n+ `la veille`\n+ `hier`\n+ `5 jours`\n+ `7j`\n+ `2 semaines`\n+ `2sem`\n+ `5mois`\n+ `ce mois-ci`\n+ `la semaine passée `\n+ `cette semaine`\n+ `cette annéee`\n+ `5 décembre 2015`\n+ `le 5 janvier`\n+ `le 5/01/2017`\n\n## References\n\nIt's the package used for [Talk to my car](http://www.talk-to-my-car.com)\n\n## Contributions\n\nFeel free to contribute and extend this package and if you have bugs or if you want more specs make an issue. Have fun !\n\n-------------\n\nMade by [Coenen Benjamin](https://twitter.com/BnJ25) with love\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnjjj%2Fgomoment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbnjjj%2Fgomoment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnjjj%2Fgomoment/lists"}