{"id":22018142,"url":"https://github.com/rvflash/elapsed","last_synced_at":"2025-05-07T03:10:09.632Z","repository":{"id":41551113,"uuid":"104642983","full_name":"rvflash/elapsed","owner":"rvflash","description":"Golang package to return the elapsed time since a given time in a human readable format","archived":false,"fork":false,"pushed_at":"2024-10-08T16:01:22.000Z","size":22,"stargazers_count":35,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T03:10:01.754Z","etag":null,"topics":["golang","time"],"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/rvflash.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":"2017-09-24T12:42:20.000Z","updated_at":"2025-02-11T21:33:36.000Z","dependencies_parsed_at":"2024-06-18T20:13:41.912Z","dependency_job_id":null,"html_url":"https://github.com/rvflash/elapsed","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Felapsed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Felapsed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Felapsed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Felapsed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvflash","download_url":"https://codeload.github.com/rvflash/elapsed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804219,"owners_count":21806771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","time"],"created_at":"2024-11-30T05:10:07.859Z","updated_at":"2025-05-07T03:10:09.607Z","avatar_url":"https://github.com/rvflash.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elapsed time\n\n[![GoDoc](https://godoc.org/github.com/rvflash/elapsed?status.svg)](https://godoc.org/github.com/rvflash/elapsed)\n[![Build Status](https://github.com/rvflash/elapsed/workflows/build/badge.svg)](https://github.com/rvflash/elapsed/actions?workflow=build)\n[![Code Coverage](https://codecov.io/gh/rvflash/elapsed/branch/master/graph/badge.svg)](https://codecov.io/gh/rvflash/elapsed)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rvflash/elapsed?)](https://goreportcard.com/report/github.com/rvflash/elapsed)\n\n\nGolang package to return the elapsed time since a given time in a human-readable format.\n\n\n### Installation\n\n```bash\n$ go get -u github.com/rvflash/elapsed\n```\n\n### Usage\n\n```go\nt := time.Now().Add(-time.Hour)\nfmt.Println(elapsed.Time(t))\n// Output: 1 hour ago\n\nt = time.Now().Add(-time.Hour * 24 * 3)\nfmt.Println(elapsed.Time(t))\n// Output:  3 days ago\n\nt, _ = time.Parse(\"2006-02-01\", \"2049-08-19\")\nfmt.Println(elapsed.Time(t))\n// Output: not yet\n\nt = time.Now().Add(-time.Hour * 24 * 3)\nfmt.Println(elapsed.LocalTime(t, \"fr\"))\n// Output: il y a 3 jours\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Felapsed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvflash%2Felapsed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Felapsed/lists"}