{"id":21466589,"url":"https://github.com/permafrost-dev/expanded-dates","last_synced_at":"2025-07-05T02:32:32.265Z","repository":{"id":57037874,"uuid":"200391503","full_name":"permafrost-dev/expanded-dates","owner":"permafrost-dev","description":"expands a date string into an object containing several useful formats","archived":false,"fork":false,"pushed_at":"2019-08-10T17:46:46.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T05:47:58.238Z","etag":null,"topics":["date-formatter","dates","relative-date","relative-time"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/permafrost-dev.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":"2019-08-03T15:31:29.000Z","updated_at":"2019-08-10T17:46:48.000Z","dependencies_parsed_at":"2022-08-23T21:00:29.233Z","dependency_job_id":null,"html_url":"https://github.com/permafrost-dev/expanded-dates","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/permafrost-dev/expanded-dates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fexpanded-dates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fexpanded-dates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fexpanded-dates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fexpanded-dates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permafrost-dev","download_url":"https://codeload.github.com/permafrost-dev/expanded-dates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fexpanded-dates/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263671748,"owners_count":23494028,"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-formatter","dates","relative-date","relative-time"],"created_at":"2024-11-23T08:14:40.791Z","updated_at":"2025-07-05T02:32:32.246Z","avatar_url":"https://github.com/permafrost-dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Expanded Dates\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/permafrost-dev/expanded-packages.svg?style=flat-square)](https://packagist.org/packages/permafrost-dev/expanded-packages)\n[![Build Status](https://travis-ci.org/permafrost-dev/expanded-dates.svg?branch=master)](https://travis-ci.org/permafrost-dev/expanded-packages)\n[![Quality Score](https://img.shields.io/scrutinizer/g/permafrost-dev/expanded-packages.svg?style=flat-square)](https://scrutinizer-ci.com/g/permafrost-dev/expanded-packages)\n[![Total Downloads](https://img.shields.io/packagist/dt/permafrost-dev/expanded-packages.svg?style=flat-square)](https://packagist.org/packages/permafrost-dev/expanded-packages)\n\n\nThis package takes an input string of a date (or a Carbon instance,) and expands it into an object containing several common formats, such as relative time and age in seconds, minutes, days, etc.  See below for an example.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require permafrost-dev/expanded-dates\n```\n\n## Usage\n\n``` php\n    include __DIR__.'/../vendor/autoload.php';\n    $dateOne = ExpandedDate::create(Carbon::now()-\u003esubSeconds(35));\n    print_r($ed1);\n```\n\nExpands to an ExpandedDate object:\n\n```\nPermafrost\\ExpandedDates\\ExpandedDate Object\n(\n    [value] =\u003e 2019-08-09T19:43:10-04:00\n    [relative] =\u003e 35 seconds ago\n    [formatted] =\u003e Aug 9, 2019\n    [time] =\u003e 7:43 PM\n    [timestamp] =\u003e 1565394190\n    [day] =\u003e Friday\n    [age] =\u003e stdClass Object\n        (\n            [seconds] =\u003e 35\n            [minutes] =\u003e 0\n            [hours] =\u003e 0\n            [days] =\u003e 0\n            [weeks] =\u003e 0\n        )\n\n)\n\n```\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermafrost-dev%2Fexpanded-dates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermafrost-dev%2Fexpanded-dates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermafrost-dev%2Fexpanded-dates/lists"}