Directory

← Back

time-display

Time display and time-diff (timeago) elements for Polymer

Author

Contributors

Rating

[ This description is mirrored from README.md at github.com/CaptainCodeman/time-display on 2019-05-22 ]

Demo and API docs

time-display

A set of elements for dealing with time in Polymer

<time-display> is an element to display time in human readable format using fecha

<time-diff> is an element to display relative time in human readable format (i.e. "timeago")

For both elements, the datetime should be provided as an ISO 8601 formatted string (UTC) or 'now' to use the current system datetime. Each user will see the time difference and display based on their own local time.

Examples:

<time-display datetime="2016-08-23T12:00:00.00" format="dddd, MMMM Do, YYYY"></time-display>

Displays: 'Tuesday, August 23rd, 2016' (in Mountain-Time timezone)

<time-diff></time-diff>

Displays: '5 minutes ago' (after 5 minutes) and updates as time goes on

<time-diff datetime="2016-08-23T12:00:00.00"></time-diff>

Displays: '2 days ago' (when this was authored)

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Dependencies

Polymer/polymer#^1.4.0

  • fecha#^2.2.0
Released
2016-09-14
Maturity
IMPORTED
License
Other

Compatibility

Framework
Polymer 1.0+
Browser
Browser Independent

time-display - Vaadin Add-on Directory

Time display and time-diff (timeago) elements for Polymer time-display - Vaadin Add-on Directory
**[ This description is mirrored from README.md at [github.com/CaptainCodeman/time-display](https://github.com//CaptainCodeman/time-display/blob/v0.0.2/README.md) on 2019-05-22 ]** _[Demo and API docs](http://captaincodeman.github.io/time-display/)_ # time-display A set of elements for dealing with time in Polymer `` is an element to display time in human readable format using [fecha](https://github.com/taylorhakes/fecha) `` is an element to display relative time in human readable format (i.e. "timeago") For both elements, the datetime should be provided as an ISO 8601 formatted string (UTC) or 'now' to use the current system datetime. Each user will see the time difference and display based on their own local time. Examples: ``` ``` Displays: 'Tuesday, August 23rd, 2016' (in Mountain-Time timezone) ``` ``` Displays: '5 minutes ago' (after 5 minutes) and updates as time goes on ``` ``` Displays: '2 days ago' (when this was authored)
Online