Giter Site home page Giter Site logo

captaincodeman / time-display Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 2.0 2.51 MB

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

Home Page: http://captaincodeman.github.io/time-display/

HTML 100.00%
timeago datetime polymer webcomponents

time-display's Introduction

Published on Vaadin  Directory Stars on vaadin.com/directory

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)

time-display's People

Contributors

binbalenci avatar captaincodeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

krumware ruckc

time-display's Issues

No open source license :-(

This looks like an open source project but I found no license information.
What do you think about putting it under an open license such as MIT?
Can't use it as it is now. :-(

Edit: In the bower file it says MIT but nowhere else. Maybe just add the MIT license in the project root / README?

Time Zone oddity

I'm using . The timestamps are in ISO 8601 format, example 2016-09-13T23:40:25.463Z. When I put this time into it renders as "in 4 hours" which is my current UTC offset. It appears it isn't calculating the timezone offset correctly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.