@advanced-rest-client/date-time
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.3
    732
    • latest

Version History

Package Sidebar

Install

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

Weekly Downloads

734

Version

3.0.3

License

Apache-2.0

Unpacked Size

49.4 kB

Total Files

6

Last publish

Collaborators

  • jarrodek
  • twoplustwoone
  • lbauret
  • carowright