Format date and time in java with prettytime

Posted by Jens Jäger on November 14, 2015

Prettytime is a nice java library to format a java Date()s in a nice humanized ago format, like:

  • moments ago
  • 2 minutes ago
  • 13 hours ago
  • 7 months ago
  • 2 years ago

Prettytime is localized in over 30 languages.

It’s super simple to use

Add the dependency to your maven pom:

or an sbt dependency if you use an activator project like play framework.

Then add the following static method to a helper class and call it from your json processor or your template engine.

Thats it!

You can find the code on github and the documentation on the ocpsoft page. Happy coding.

Good-by 2

Posted by Jens Jäger on November 03, 2014

In 2006 I startet a travel website called with some friends. The goal was to build the ultimative website for individual travelers. The side has some successes but never get the momentum to grow this thing to a successful startup.

Our biggest problem was the vision to build the ultimative site for everything about travel (Blogging, picture sharing, social network, hostel search,…) instead of doing one thing really well. If you want to start any kind of startup make sure you have the one thing in mind you wan’t to really solve for your customers. Don’t try to make everything for everybody.

We learned a lot and had a lot of fun with the site. But finally it’s time to say good-by screenshot

Blog split

Posted by Jens Jäger on August 27, 2014

This blog will be splitted into two blogs. Here ( I will keep posting technical stuff about developing web applications with Java, Scala, Ruby, Javascript and Playframework. Some other geeky stuff might come along.

My new blog ( will be in german about business and investment.

I also removed the german stuff from here and moved all the old german posts to If you click on a link to a german post, you might be redirected to

If you speek german you’re welcome to have a look at the all new You might also want to follow my german Rss-feed or sign up for my shiny new newsletter.

Why two blogs?

When I started blogging I started in german. After some time I realized software development stuff is easier written in english. This is because allmost all resources are already in english and programming code has english keywords anyway.

Then I switched to write blogposts in english. That was fine. But having two languages in one blog is kind of ugly. I never cared much until I decided to write more about business an investing topics. The problem with this topics is, some parts like tax or law stuff is really country specific. A lot of investment or business advise I can give works only in germany. So I makes perfectly sense to write those posts in german.

This was the point I decided to split my blog into two and make this one english only.

New page for my consulting company

Posted by Jens Jäger on January 22, 2014

I just build a new german marketing page for my consulting company. It’s build with bootstrap and is much nicer than the old one, and has a full responsive design. Here is the before and after comparison:



Thoughts I took home from ping conference

Posted by Jens Jäger on January 17, 2014

Here are some thoughts I took home from ping conference:

  • Future applications will have more needs for functional programming. This demand is driven by async userinterfaces and data streaming over http from different sources. Think of an application streaming the realtime positions of cars to a map. Maybe a taxi search.
  • For me it’s not sure if the lambda functions for java 8 will be a door opener to bring more people to scala. Or will java lambda with some additional libraries good enough to not switch to scala?
  • There is a new javascript mvc framework every week. It will need a long time if ever until we have a mvc framework with a strong position like jQuery today. If you think back some years this was the same with javascript libaries, today jQuery is everywhere.
  • Almost every speaker at the conference uses IntelliJ on a Mac. There is probably a reason for that.
  • To be prepared for future functional programming challenges I should read the wizard book again and learn about free monads.


All over a great conference and really worth the travel. Also budapest is really a nice city to travel to.