npm.io
3.0.3 • Published 4 years ago

@advanced-rest-client/date-time

Licence
Apache-2.0
Version
3.0.3
Deps
0
Size
48 kB
Vulns
0
Weekly
0

DEPRECATED

Use the @anypoint-web-components/awc module instead.


An element to render data and/or time formatted for user locale.

<date-time date="2010-12-10T11:50:45Z" year="numeric" month="narrow" day="numeric"></date-time>

API components

This components is a part of API components ecosystem

Usage

Installation
npm install --save @advanced-rest-client/date-time
In an html file
<html>
  <head>
    <script type="module">
      import '@advanced-rest-client/date-time/date-time.js';
    </script>
  </head>
  <body>
    <date-time date="2010-12-10T11:50:45Z" year="numeric" month="long" day="numeric" hour="2-digit" minute="2-digit" second="2-digit"></date-time>
  </body>
</html>
In a Polymer 3 element
import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/date-time/date-time.js';

class SampleElement extends LitElement {
  render() {
    return html`
    <date-time date="2010-12-10T11:50:45Z" year="numeric" month="long" day="numeric" hour="2-digit" minute="2-digit" second="2-digit"></date-time>
    `;
  }
}
customElements.define('sample-element', SampleElement);
Installation
git clone https://github.com/advanced-rest-client/date-time
cd date-time
npm install
Running the demo locally
npm start
Running the tests
npm test

Keywords