{"id":15659068,"url":"https://github.com/willrax/ember-luxon","last_synced_at":"2025-05-05T17:12:30.507Z","repository":{"id":57224003,"uuid":"113564553","full_name":"willrax/ember-luxon","owner":"willrax","description":"🕐 🌐 [deprecated] Addon thats brings Luxon to Ember applications.","archived":false,"fork":false,"pushed_at":"2020-10-21T21:58:08.000Z","size":366,"stargazers_count":22,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-04T13:14:48.730Z","etag":null,"topics":["ember","ember-addon","ember-cli","luxon"],"latest_commit_sha":null,"homepage":"","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/willrax.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-12-08T10:53:34.000Z","updated_at":"2024-05-30T02:50:10.000Z","dependencies_parsed_at":"2022-08-30T02:40:33.031Z","dependency_job_id":null,"html_url":"https://github.com/willrax/ember-luxon","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willrax%2Fember-luxon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willrax%2Fember-luxon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willrax%2Fember-luxon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willrax%2Fember-luxon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willrax","download_url":"https://codeload.github.com/willrax/ember-luxon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221142498,"owners_count":16763412,"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":["ember","ember-addon","ember-cli","luxon"],"created_at":"2024-10-03T13:14:48.667Z","updated_at":"2024-10-23T00:20:51.076Z","avatar_url":"https://github.com/willrax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-luxon\n\n# Deprecated. I no longer work with Ember so it's tricky to keep this up to date. If you require this library, I'd suggest forking it. Alternatively, install luxon directly and copy the helpers in.\n\n[![NPM version](https://img.shields.io/npm/v/ember-luxon.svg?style=for-the-badge)](https://npmjs.com/package/ember-luxon)\n[![CircleCI](https://img.shields.io/circleci/project/github/willrax/ember-luxon/master.svg?style=for-the-badge)](https://circleci.com/gh/willrax/ember-luxon/tree/master)\n\nAn addon to allow importing of [Luxon](https://moment.github.io/luxon/) in your Ember Apps.\n\n## Installation\n\n* `ember install ember-luxon`;\n\nMost modern browers will work fine with luxon. If you need to support legacy browsers you will need to include some polyfills.\n\nYou can provide an option in your apps `ember-cli-build.js` file and we'll add [intl.js](https://github.com/andyearnshaw/Intl.js/) to your build.\n\n```js\n'ember-luxon': {\n  includeIntlPolyfill: true\n}\n```\n\nSee the Luxon [support matrix](https://moment.github.io/luxon/docs/manual/matrix.html) for more information and which browsers support which features and other caveats.\n\n## Usage\n\n```js\nimport { DateTime, Duration, Info, Interval, Settings, Zone } from 'ember-luxon';\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  theTime: computed(function() {\n    return DateTime.local()\n  })\n});\n```\n\n### Helpers\n\nEmber luxon provices some helpers for use in templates.\n\n**luxon**\n\nGiven a string and a format it will generate a luxon datetime object.\n\n```hbs\n{{luxon \"2014 Aug 06\" \"yyyy LLL dd\"}}\n```\n\n**luxon-diff**\n\nThis will determine the length of time between two days.\nPrecision is optional and will default to milliseconds.\n\n```hbs\n{{luxon-diff dateOne dateTwo}}                  /* 86400000\n{{luxon-diff dateOne dateTwo precision=\"days\"}} /* 1\n```\n\n**luxon-format**\n\nGiven a datetime object it will format it. If you don't provide a format string\nember-luxon will default to using local formatting.\n\n```hbs\n{{luxon-format dateOne format=\"yyyy LLL dd\"}} /* \"2014 Aug 06\"\n{{luxon-format dateOne}}                      /* \"4/20/2017\"\n```\n\n**luxon-is-after**\n\nWill return true or false depending on whether the first dateTime is after the second.\n\n```hbs\n{{luxon-is-after earlyDate lateDate}} /* true\n{{luxon-is-after lateDate earlyDate}} /* false\n```\n\n**luxon-is-before**\n\nWill return true or false depending on whether the first dateTime is before the second.\n\n```hbs\n{{luxon-is-before earlyDate lateDate}} /* true\n{{luxon-is-before lateDate earlyDate}} /* false\n```\n\n**luxon-is-before**\n\nWill return true or false depending on whether the first dateTime is contained within a pair of dates.\n\n```hbs\n{{luxon-is-before dateTime startDate endDate}} /* true\n```\n\n**luxon-is-same**\n\nWill return true or false depending on whether the first dateTime is the same as the other date.\nYou can set the precision here to verify if it is the day, millisecond, hour etc.\n\n```hbs\n{{luxon-is-same dateTime dateTime}}                        /* true\n{{luxon-is-same dateTime dateTimeTwo precision=\"day\"}}     /* true\n{{luxon-is-same dateTime dateTimeThree precision=\"month\"}} /* true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillrax%2Fember-luxon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillrax%2Fember-luxon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillrax%2Fember-luxon/lists"}