0.2.1 • Published 5 years ago

osagai-time v0.2.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

osagai-time 🕰🌎

Formats the timestamp as a localized string in the user's browser.

Install

Package managers

npm

npm install osagai-time

yarn

yarn add osagai-time

CDN

Javascript Module

import 'https://unpkg.com/osagai-time@0.1.0/dist/osagai-time.mjs'

Script tag

<script src="https://unpkg.com/osagai-time@0.1.0/dist/osagai-time.umd.js"></script>

Usage

<local-time
  datetime="2019-01-01T16:30:00-08:00"
  month="short"
  day="numeric"
  year="numeric"
  hour="numeric"
  minute="numeric"
>
  January 2, 2019 4:30PM PDT
</local-time>

Result: 2 Jan 2019 01:30

See Also

The implementation is just a translation of custom elements from github/time-elements into Osagai components. Thanks to @github for open-sourcing amazing custom elements allowing that work.

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago