Directory

← Back

MomentLabel

MomentLabel displays your time ranges in a human-readable format.

Author

Rating

Popularity

<100

MomentLabel add-on is a drop-in replacement for Vaadin Label that displays time ranges in a human-readable format, for example "5 minutes ago" or "in 30 days".

The label content is updated on client-side every minute, so you'll see the changes in real-time as time passes without any roundtrip to the server.

The client-side implementation uses MIT licensed Moment.js Javascript library.

Sample code

// display the current date...
MomentLabel label = new MomentLabel("This MomentLabel was created ${moment}.");

// ...or set some specific date
label.setMoment(new java.util.Date());

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

Released
2011-11-18
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.0+
Browser
Internet Explorer
Internet Explorer
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Internet Explorer

MomentLabel - Vaadin Add-on Directory

MomentLabel displays your time ranges in a human-readable format. MomentLabel - Vaadin Add-on Directory
MomentLabel add-on is a drop-in replacement for Vaadin Label that displays time ranges in a human-readable format, for example "5 minutes ago" or "in 30 days". The label content is updated on client-side every minute, so you'll see the changes in real-time as time passes without any roundtrip to the server. The client-side implementation uses MIT licensed Moment.js Javascript library.
Online