Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@advanced-rest-client/date-time

3.0.2 • Public • Published

Published on NPM

Build Status

Published on webcomponents.org

<date-time>

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

Install

npm i @advanced-rest-client/date-time

DownloadsWeekly Downloads

157

Version

3.0.2

License

Apache-2.0

Unpacked Size

49.7 kB

Total Files

6

Last publish

Collaborators

  • avatar
  • avatar
  • avatar