Skip to content

dotweblabs/timeago-gwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Java timeago library (GWT)

This is a GWT port of the Java port of the jquery-timeago plug-in. Please visit the jquery-timeago project page to read more about fuzzy timestamps.

##Building

The timeago project contains a Maven pom.xml file that builds a jar containing the TimeAgo class.

To build and run the included unit tests:

$ mvn clean install

##Usage

TimeAgo time = new TimeAgo();
long current = System.currentTimeMillis();
String minutes = time.timeAgo(current - (15 * 60 * 1000));	// returns "15 minutes ago"
String hours = time.timeUntil(current - (6 * 60 * 60 * 1000));	// returns "6 hours from now"

Maven

This library is available from Maven Central.

<dependency>
  <groupId>com.dotweblabs</groupId>
  <artifactId>timeago-gwt</artifactId>
  <version>0-SNAPSHOT</version>
</dependency>

##Contribution

If you would like to contribute locale-specific properties files please fork this repository and open a pull request.

##Other

MIT License

About

Port of java-time ago to GWT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages