{"_id":"@adc/date","_rev":"3-0b29403f0215957f6fe42506bbb0b686","name":"@adc/date","dist-tags":{"latest":"1.2.1"},"versions":{"1.1.1":{"name":"@adc/date","version":"1.1.1","description":"A web component to help you format your dates.","publishConfig":{"access":"public"},"module":"dist/esm/index.js","main":"dist/index.js","types":"dist/types/components.d.ts","collection":"dist/collection/collection-manifest.json","scripts":{"build":"stencil build","build:docs":"stencil build --docs","start":"stencil build --dev --watch --serve","test":"stencil test --spec --e2e","test:watch":"stencil test --spec --e2e --watchAll"},"dependencies":{"date-fns":"2.0.0-alpha.25"},"devDependencies":{"@stencil/core":"~0.15.1","@types/jest":"23.3.9","@types/puppeteer":"1.10.0","jest":"23.6.0","jest-cli":"23.6.0","puppeteer":"1.8.0","semantic-release":"^15.12.0"},"repository":{"type":"git","url":"git+https://github.com/aide-de-camp/date.git"},"author":{"name":"David Guijarro","email":"guijarro.dav@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/aide-de-camp/date"},"homepage":"https://github.com/aide-de-camp/date","gitHead":"7e1be05aef9ffaf5ca92ff1f3bdbe98f5a730df7","_id":"@adc/date@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"davguij","email":"guijarro.dav@gmail.com"},"dist":{"integrity":"sha512-cniptjjWsbK+5jqiBT3nrPN0/kNFq0LtU5KfSHVBDapDYLVgG8AvQoe5vJQXoz8K7T5WG4Jx/gO2jqcRxe144A==","shasum":"0ca31cc78418e180fc597d355fdb973b18a79b5c","tarball":"https://registry.npmjs.org/@adc/date/-/date-1.1.1.tgz","fileCount":3,"unpackedSize":6044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8e3LCRA9TVsSAnZWagAAF4gP/0V6YBVPT4HSOlEM1T4t\nRzw1Sx+qv0uNxQCF/U0/SgRNx/Cn1p/Nd6kDYmYOiuZVmjKAURHq31nAjNkx\nvUf5qaUAWAi2JihpqaF1ddUd+NK6uKnnGQTIrxoeHxji9+G3PhMwpi2DLZYc\nNad4YR6Zb1hBMM79wjigu3U6OnBOwX5wAPKV+39kS7Mp/03YDo0gnbFvx+fB\n0irT9cdfgP1HMc1dhDlS9vesn8rjorixAG14xEqpoIZISrAXN2D/dG9ByxqH\nQaTClU8uYvVeRNNAJNQCN8uIx1qjwXdTWNYzxpWuIp9epDvU38aTghSij40I\nKg6QSyhqwjGFyNwVGJZi1Q+PErucPgoJTQbn5/sprb6UCAAln+7jD2wzycKX\nvmdRMDZmRZGMM1Ny7I+oFSxs1R+ev+jw9nV9VfgNYrFDFpKoxcv1J02g1n+W\nqyRGbbp4S5Ge3zsMyWHL5hycUmx5M92X//TnnrT4vLKNCjIyIii+JEO77VUo\nkPS1+lBou4m7qTh7JD+2p1ZwmfRXlt00vyHGEaq8HMNTejwCfeKvIw1i8/CT\nvMpL/T/1irrwsCCWfG7+HLe+Qaj2QBXZEkpGBlXaWGVcBG/dV6NfNbAZlewe\nyWAAiLdKaW+UUZKxzwKq9EAQb27kGQlSM3EnGlNN2UIM2sE85UhUM13Egn4K\nfaln\r\n=evwU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFuiiUhQ8k80Ve4o2LsYQFl9qyPdlVAfKfZ1WwhL+6n2AiAffCFMOpTvLQSVwe6qXJgoeGAUInEm+H0Yg7DhcstLvQ=="}]},"maintainers":[{"name":"davguij","email":"guijarro.dav@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/date_1.1.1_1542581706965_0.2667606734942034"},"_hasShrinkwrap":false},"1.2.0":{"name":"@adc/date","version":"1.2.0","description":"A Web Component collection that helps you format your dates.","keywords":["stencil","stencil components","jsx","html","web components","date formatting","date-fns","datetime","date-format"],"publishConfig":{"access":"public"},"module":"dist/esm/index.js","main":"dist/index.js","types":"dist/types/components.d.ts","collection":"dist/collection/collection-manifest.json","scripts":{"build":"stencil build","build:docs":"stencil build --docs","start":"stencil build --dev --watch --serve","test":"stencil test --spec --e2e","test:watch":"stencil test --spec --e2e --watchAll"},"dependencies":{"date-fns":"2.0.0-alpha.25"},"devDependencies":{"@stencil/core":"~0.15.1","@types/jest":"23.3.9","@types/puppeteer":"1.10.0","jest":"23.6.0","jest-cli":"23.6.0","puppeteer":"1.8.0","semantic-release":"^15.12.0"},"repository":{"type":"git","url":"git+https://github.com/aide-de-camp/date.git"},"author":{"name":"David Guijarro","email":"guijarro.dav@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/aide-de-camp/date"},"homepage":"https://github.com/aide-de-camp/date","gitHead":"c9fdaf37a3cf6374dfed4d3aac23cf98c462c0bd","_id":"@adc/date@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"davguij","email":"guijarro.dav@gmail.com"},"dist":{"integrity":"sha512-iD6Mrm7NdZoPftBt+WuoJgfdAKRcEx2V+C28lH7DHcB2OVOuRKsRONM2dDboPp99wXwGwaIh1aUhMY9/LHrAoQ==","shasum":"f734c03c4fa1e6df299963c56066b9b1780a7640","tarball":"https://registry.npmjs.org/@adc/date/-/date-1.2.0.tgz","fileCount":3,"unpackedSize":8685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAs2dCRA9TVsSAnZWagAAkq0P/1xLF1rUP+QcRKcc5rma\n8VzZwg/ufNv5zMJ356SmP52qSs2ZYDlIfKV4QT0NpL6GTJc9/uzPrrgwfHKz\nTmZcYO7l8v6zO75Klb+yfEHPxZX6zaePxCf0xEpmx3WiD/oUKtSwhgYNOq8X\nheJ73h3FQiDQpLLNtgYuJV+mYAHyyuC05sQuGUO6E2SZX89vVQ9CyHWYZ83V\nozivmLvtKOW5sECWd2v9mL172i84NRoJJIkithDprbNW9iR7oGhTT1U7DsCc\nPlFh2O+ZOAwW6itSrxvWiAk2j7eJWV74jb8OTCL/4krRx9jMFDfGCy1oSnJ7\nztxp4hJnoiyznrJrsIoNcGNXEPQzTcG/jxbYKQzJSvC/PQhtbBEKsCxuXEr0\nvIWf2CX0afMTfmtCLXCmyVNcEl1THyvG5sTlzRtfem8pXBfuhU7oqV0othlR\ni9fHr9Y60146Q0NtHft19MngVMmQLKnWNYvoUoDci7OgS83yDJ6r828kINH7\ns9J1NaaP2sdLA+qkbre7yinhrLQTvyPu72pmagLsxHzfUKZH6F8z91iINP9a\nOWhtHZ6xL1GqoEerLyWHgDefQYoO316k3GPxLMJNHtXyBAnybUWEf0KxDfK4\np5AtpxKSgoEOBBodUqcvONIrePj7E4xIhsSZMv8e7iavGKKltngArs/GDDnW\n6T7v\r\n=BY0N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDIIdU/k8uM/ZSyCwIi3YC/ne16g0noZO/PLZlp2H12UAiEAqUMtAaknnpHeq5GprTl3/d7Au/DuLrY0MdSTo93QzQI="}]},"maintainers":[{"name":"davguij","email":"guijarro.dav@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/date_1.2.0_1543687580252_0.1489052982966741"},"_hasShrinkwrap":false},"1.2.1":{"name":"@adc/date","version":"1.2.1","description":"A Web Component collection that helps you format your dates.","keywords":["stencil","stencil-components","jsx","html","web-components","date-formatting","date-fns","datetime","date-format"],"publishConfig":{"access":"public"},"module":"dist/esm/index.js","main":"dist/index.js","types":"dist/types/components.d.ts","collection":"dist/collection/collection-manifest.json","scripts":{"build":"stencil build","build:docs":"stencil build --docs","start":"stencil build --dev --watch --serve","test":"stencil test --spec --e2e","test:watch":"stencil test --spec --e2e --watchAll"},"dependencies":{"date-fns":"2.0.0-alpha.25"},"devDependencies":{"@stencil/core":"~0.15.1","@types/jest":"23.3.9","@types/puppeteer":"1.10.0","jest":"23.6.0","jest-cli":"23.6.0","puppeteer":"1.8.0","semantic-release":"^15.12.0"},"repository":{"type":"git","url":"git+https://github.com/aide-de-camp/date.git"},"author":{"name":"David Guijarro","email":"guijarro.dav@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/aide-de-camp/date"},"homepage":"https://github.com/aide-de-camp/date","gitHead":"db7bcd6159b3421727a96631d7d62ec82a0efa65","_id":"@adc/date@1.2.1","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"davguij","email":"guijarro.dav@gmail.com"},"dist":{"integrity":"sha512-bnXpQUSHtGNUbQ4VJcoE331sqkmXDnd+3y8AtwAFnBDoROfoDKmrRIeDH+RL+SdXS2BTc+jlk/00yMo4yGXHlw==","shasum":"631e130e8414dd366df1aa702238d7f323853cc2","tarball":"https://registry.npmjs.org/@adc/date/-/date-1.2.1.tgz","fileCount":3,"unpackedSize":8779,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAtC0CRA9TVsSAnZWagAA4SUQAIQ1nZPk9epV73Suwt1v\newta/UDeA6QDl9ZaqsqqXcl4CKVHplMbfBNyokH7Xzuw4nEbsf0um7/CKUqm\ng0xlyt+9eDUPkPkBoK6V3WJuyH4ldxfzVAbN2s8nZyheVC9XndIRHSG0UcAx\namUrB3lItVKUjfEJLw02nC/hYvD46zstk79vG6vGCYWu1FORiEg7oZHxXG54\nnzPjUwQLhYAaN7Wn5NrV2ewPXWbdlzWf2HCJqs2m4VY5YoPI9VdQa4+ziUn9\noVuiWx4kPw0lwAnsi/9tBTlkwrAy5+MVk7T0xSnbugAU9mT/xGP59yfS5+ez\nPCi0Nkl+wqnmekWSixhgErH9Pe8LeYA1OKCfO05mY2gl7IM9YG2nbmu0y97T\nOGYOunbOXYp0NvwGNfiM4dEl5zg5tJOFx4EtBzSgp7YnQqSw1v+L4gCOxiOM\nM3KSjaIytV8k4Jyn5FMtGt5EFw+rbKIl3xPcmJFAEZbvwVA6pCMjqPttR9sf\nv83RbBUrZYMSWtCCnDdmxTWNzcntaFlADo817TlRfQ+vmw2m/+yu6jTUBEvd\nlj7ruIA68th7wzqV8mNwMccvaXU7BqVhf0bXqpJyLZccxsI8pgjCu1bee8dh\nOoe0ngK0hlq5Wsiy0cpo66PyFAUavnOL3TYg8Q59rssg26K/fPBQ2Ghn4DTL\nKYNA\r\n=YHhU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtBiL9s2QOmcVVPbdtrKjbFpNQzs6q+mijlJLopeOUVAiEAlZnNW/S7cEnMcOojOmb1gQPW316Xeadx8x/1Aq7xRYs="}]},"maintainers":[{"name":"davguij","email":"guijarro.dav@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/date_1.2.1_1543688371718_0.560899323395615"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-18T22:55:06.783Z","1.1.1":"2018-11-18T22:55:07.114Z","modified":"2022-04-04T11:27:38.648Z","1.2.0":"2018-12-01T18:06:20.395Z","1.2.1":"2018-12-01T18:19:31.872Z"},"maintainers":[{"name":"davguij","email":"guijarro.dav@gmail.com"}],"description":"A Web Component collection that helps you format your dates.","homepage":"https://github.com/aide-de-camp/date","repository":{"type":"git","url":"git+https://github.com/aide-de-camp/date.git"},"author":{"name":"David Guijarro","email":"guijarro.dav@gmail.com"},"bugs":{"url":"https://github.com/aide-de-camp/date"},"license":"MIT","readme":"# @adc/date\n\n![](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)\n![npm (scoped)](https://img.shields.io/npm/v/@adc/date.svg?style=flat-square)\n![](https://img.shields.io/travis/com/aide-de-camp/date/master.svg?style=flat-square)\n![npm](https://img.shields.io/npm/dm/@adc/date.svg?style=flat-square)\n![GitHub](https://img.shields.io/github/license/aide-de-camp/date.svg?style=flat-square)\n\nThis is a collection of standalone Web Components to easily format dates.\n\n**@adc/date** is part of the [aide-de-camp](https://github.com/aide-de-camp) Web Components collection.\n\n## How to install\n\nYou can either:\n\n- install the npm package with `npm install @adc/date`\n- rely on unpkg.com and a good ol' `<script>` tag\n\n## How to use\n\n### Framework-less\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <script src=\"https://unpkg.com/@adc/date/latest/dist/adc-date.js\"></script>\n    <!-- or use the path to your node_modules folder if you are using npm -->\n  </head>\n  <body>\n    <!-- The @adc/date Web Components are now ready to be used. -->\n    <!-- Please refer to the Component Catalog section below -->\n  </body>\n</html>\n```\n\nAlternatively, if you want to take advantage of ES Modules, you could include the components using an import statement.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <script type=\"module\">\n      import { defineCustomElements } from 'https://unpkg.com/@adc/date/latest/dist/esm/es2017/adc-date.define.js';\n      // or use the path to your node_modules folder if you are using npm\n      defineCustomElements(window);\n    </script>\n  </head>\n  <body>\n    <!-- The @adc/date Web Components are now ready to be used. -->\n    <!-- Please refer to the Component Catalog section below -->\n  </body>\n</html>\n```\n\n### Angular\n\n#### Including the Custom Elements Schema\n\nIncluding the`CUSTOM_ELEMENTS_SCHEMA` in the module allows the use of the web components in the HTML markup without the compiler producing errors. Here is an example of adding it to `AppModule`:\n\n```ts\nimport { BrowserModule } from '@angular/platform-browser';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { AppComponent } from './app.component';\nimport { SharedModule } from './shared/shared.module';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [BrowserModule, FormsModule, SharedModule],\n  bootstrap: [AppComponent],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class AppModule {}\n```\n\nThe CUSTOM_ELEMENTS_SCHEMA needs to be included in any module that uses custom elements.\n\n#### Calling defineCustomElements\n\nA component collection built with Stencil (such as this one) includes a main function that is used to load the components in the collection. That function is called `defineCustomElements()` and it needs to be called once during the bootstrapping of your application. One convenient place to do this is in `main.ts` as such:\n\n```ts\nimport { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nimport { defineCustomElements } from '@adc/date/dist/loader';\n\nif (environment.production) {\n  enableProdMode();\n}\n\nplatformBrowserDynamic()\n  .bootstrapModule(AppModule)\n  .catch(err => console.log(err));\ndefineCustomElements(window);\n```\n\n### React\n\nWith an application built using the `create-react-app` starter the easiest way to include the component library is to call `defineCustomElements(window)` from the `index.js` file.\n\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport registerServiceWorker from './registerServiceWorker';\n\nimport { defineCustomElements } from '@adc/date/dist/loader';\n\nReactDOM.render(<App />, document.getElementById('root'));\nregisterServiceWorker();\ndefineCustomElements(window);\n```\n\n### Vue.js\n\nIn order to use the custom element library within the Vue app, the application must be modified to define the custom elements and to inform the Vue compiler which elements to ignore during compilation. This can all be done within the `main.js` file. For example (assuming you created your project with `vue-cli`):\n\n```js\nimport Vue from 'vue';\nimport App from './App.vue';\nimport { defineCustomElements } from '@adc/date/dist/loader';\n\nVue.config.productionTip = false;\nVue.config.ignoredElements = [/adc-date-\\w*/];\n\ndefineCustomElements(window);\n\nnew Vue({\n  render: h => h(App),\n}).$mount('#app');\n```\n\n## Component Catalog\n\n- [adc-date-ago](https://github.com/aide-de-camp/pay/tree/master/src/components/date-ago)\n- [adc-date-epoch](https://github.com/aide-de-camp/pay/tree/master/src/components/date-epoch)\n- [adc-date-relative](https://github.com/aide-de-camp/pay/tree/master/src/components/date-relative)\n\n## Browser support\n\n- Chrome (and all Chromium based browsers)\n- Safari\n- Edge\n- Firefox\n- IE 11\n\nWeb Components, specifically Custom Elements, are natively supported in Chrome and Safari and are coming to both Edge and Firefox. A dynamic polyfill loader is already included in order to only load the polyfills for the browsers that are missing specific features.\n","readmeFilename":"README.md","keywords":["stencil","stencil-components","jsx","html","web-components","date-formatting","date-fns","datetime","date-format"]}