{"id":18801938,"url":"https://github.com/sporto/time-distance","last_synced_at":"2026-01-04T19:30:16.773Z","repository":{"id":62419551,"uuid":"147782292","full_name":"sporto/time-distance","owner":"sporto","description":"Elm time distance","archived":false,"fork":false,"pushed_at":"2019-05-27T04:48:11.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T19:58:37.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elm","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/sporto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-09-07T06:44:04.000Z","updated_at":"2019-05-27T04:46:00.000Z","dependencies_parsed_at":"2022-11-01T17:00:39.766Z","dependency_job_id":null,"html_url":"https://github.com/sporto/time-distance","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporto%2Ftime-distance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporto%2Ftime-distance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporto%2Ftime-distance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporto%2Ftime-distance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sporto","download_url":"https://codeload.github.com/sporto/time-distance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239735263,"owners_count":19688262,"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":[],"created_at":"2024-11-07T22:25:51.202Z","updated_at":"2026-01-04T19:30:16.440Z","avatar_url":"https://github.com/sporto.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Time distance\n\n[ ![Codeship Status for sporto/time-distance](https://app.codeship.com/projects/12cafa70-94a9-0136-c270-42599d9126df/status?branch=master)](https://app.codeship.com/projects/304697)\n\nReturn the distance between two times in words.\n\ne.g.\n\n- `less than 5 seconds`\n- `about 1 month`\n- `over 5 year`\n\nThis use the \u003chttps://package.elm-lang.org/packages/elm/time/latest/\u003e package.\n\n## Installation\n\n```\nelm install sporto/time-distance\n```\n\n## Usage\n\n```\nimport Time\nimport Time.Distance as Distance\n\ntime1 = Time.fromMillis 1530403200000\ntime2 = Time.fromMillis 1530403205000\n\nDistance.inWords time1 time2 == \"less than 5 seconds\"\n```\n\nMore examples in the /test folder.\n\nHeavily inspired by \u003chttps://github.com/alpacaaa/elm-date-distance\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsporto%2Ftime-distance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsporto%2Ftime-distance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsporto%2Ftime-distance/lists"}