{"id":15503112,"url":"https://github.com/johno/ember-cli-dates","last_synced_at":"2025-04-22T23:22:20.049Z","repository":{"id":20754613,"uuid":"24039132","full_name":"johno/ember-cli-dates","owner":"johno","description":"Ember date helpers with locale support.","archived":false,"fork":false,"pushed_at":"2016-10-22T19:23:53.000Z","size":1897,"stargazers_count":17,"open_issues_count":8,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T17:31:23.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/ember-cli-dates","language":"JavaScript","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/johno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-15T01:59:35.000Z","updated_at":"2023-07-22T17:23:21.000Z","dependencies_parsed_at":"2022-09-19T01:01:38.223Z","dependency_job_id":null,"html_url":"https://github.com/johno/ember-cli-dates","commit_stats":null,"previous_names":["johnotander/ember-cli-dates"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fember-cli-dates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fember-cli-dates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fember-cli-dates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fember-cli-dates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johno","download_url":"https://codeload.github.com/johno/ember-cli-dates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338505,"owners_count":21414199,"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-10-02T09:12:12.781Z","updated_at":"2025-04-22T23:22:20.033Z","avatar_url":"https://github.com/johno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-dates [![Build](https://travis-ci.org/johnotander/ember-cli-dates.svg?branch=master)](https://travis-ci.org/johnotander/ember-cli-dates) [![Ember Observer Score](http://emberobserver.com/badges/ember-cli-dates.svg)](http://emberobserver.com/addons/ember-cli-dates)\n\nEmber date helpers with locale support.\n\nThis addon includes `time-ago-in-words`, `time-ahead-in-words`, `time-delta-in-words`,\n`time-format`, `day-of-the-week`, `date-and-time`, `month-and-day`, `month-and-year`.\nIt uses moment.js.\n\n## Installation\n\n```\nember install:addon ember-cli-dates\n```\n\n## Usage\n\nNow, in your views/templates/components:\n\n### Time Deltas\n\n#### Time Ago in Words\n\n```hbs\n{{time-ago-in-words createdAt}} {{! =\u003e twelve days ago}}\n```\n\n#### Time Ahead in Words\n\n```hbs\n{{time-ahead-in-words toBePublishedAt}} {{! =\u003e in 4 hours}}\n```\n\n#### Time Delta in Words\n\n```hbs\n{{time-delta-in-words completedAt}} {{! =\u003e 7 minutes ago}}\n```\n\n#### Month and Day\n\n```hbs\n{{month-and-day completedAt}} {{! =\u003e Jan 1st}}\n{{month-and-day completedAt}} {{! =\u003e jan 1º}}\n```\n\n#### Month and Year\n\n```hbs\n{{month-and-year completedAt 'pt-br'}} {{! =\u003e Jan 2015}}\n```\n\n#### Date and Time\n\n```hbs\n{{date-and-time publishedAt}} {{! January 1, 2014 12:00 AM}}\n{{date-and-time publishedAt 'pt-br'}} {{! 1 de janeiro de 2014 às 00:00}}\n```\n\n### Custom Format\n\n```hbs\n{{time-format updatedAt 'l'}} {{! =\u003e 10/9/2014}}\n```\n\n### Day of the Week\n\n```hbs\n{{day-of-the-week someDate}} {{! =\u003e Friday}}\n```\n\n## Locale Support\n\nIn order to add locale support, you need to import the locale file in your app's `Brocfile.js`:\n\n```js\napp.import(app.bowerDirectory + '/moment/locale/pt-br.js');\n```\n\nYou then have the ability to specify any imported locale with:\n\n```hbs\n{{time-format createdAt 'LLLL' 'pt-br'}}\n{{time-ahead-in-words nextHour 'pt-br'}}\n```\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork it\n2. npm install\n3. bower install\n4. Create your feature branch (`git checkout -b my-new-feature`)\n5. Commit your changes (`git commit -am 'Add some feature'`)\n6. Push to the branch (`git push origin my-new-feature`)\n7. Create new Pull Request\n\nCrafted with \u003c3 by [John Otander](http://johnotander.com)([@4lpine](https://twitter.com/4lpine)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fember-cli-dates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohno%2Fember-cli-dates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fember-cli-dates/lists"}