{"id":20170713,"url":"https://github.com/pear/date_humandiff","last_synced_at":"2025-04-10T02:31:35.649Z","repository":{"id":3031394,"uuid":"4051666","full_name":"pear/Date_HumanDiff","owner":"pear","description":"Generate textual time differences that are easily understandable by humans.","archived":false,"fork":false,"pushed_at":"2019-10-18T04:24:44.000Z","size":48,"stargazers_count":25,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-24T04:01:43.023Z","etag":null,"topics":["date","library","php","time"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"surajx/qemu-arm-linux","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pear.png","metadata":{"files":{"readme":"README.rst","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":"2012-04-17T11:10:33.000Z","updated_at":"2024-12-16T16:05:14.000Z","dependencies_parsed_at":"2022-09-13T04:40:43.542Z","dependency_job_id":null,"html_url":"https://github.com/pear/Date_HumanDiff","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FDate_HumanDiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FDate_HumanDiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FDate_HumanDiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FDate_HumanDiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pear","download_url":"https://codeload.github.com/pear/Date_HumanDiff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144216,"owners_count":21054886,"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":["date","library","php","time"],"created_at":"2024-11-14T01:20:23.115Z","updated_at":"2025-04-10T02:31:35.625Z","avatar_url":"https://github.com/pear.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"**************\nDate_HumanDiff\n**************\nGenerate textual time differences that are easily understandable by humans.\n\nThe class supports minutes, hours, days, weeks, months and years.\n\nExamples:\n\n- 5 seconds ago -\u003e `just now`\n- 65 seconds ago -\u003e `a minute ago`\n- 120 seconds ago -\u003e `2 minutes ago`\n- `a week ago`\n- `3 weeks ago`\n- `a month ago`\n- `8 months ago`\n- `a year ago`\n- `5 years ago`\n\n\nUsage\n=====\n::\n\n  \u003c?php\n  require_once 'Date/HumanDiff.php';\n  $dh = new Date_HumanDiff();\n  echo $dh-\u003eget(time() - 3600);//shows \"an hour ago\"\n  echo $dh-\u003eget(time() + 3600 * 24, time()); //shows \"tomorrow\"\n\n  ?\u003e\n\n\nSupported languages\n===================\n- German\n- English\n- Greek\n- Persian\n- Russian\n\nUse a language with ``setLocale()``::\n\n    $dh = new Date_HumanDiff();\n    $dh-\u003esetLocale('de');\n    echo $dh-\u003eget(time() - 60 * 5) . \"\\n\"; //shows \"vor 5 Minuten\"\n\n\nOther libraries\n===============\nhttps://github.com/azer/relative-date/blob/master/lib/relative-date.js\n Javascript; library that's been used as base for Date_HumanDiff\nhttps://github.com/rmm5t/jquery-timeago\n Javascript; with localization options\nhttp://pypi.python.org/pypi/py-pretty\n Python\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpear%2Fdate_humandiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpear%2Fdate_humandiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpear%2Fdate_humandiff/lists"}