Reputation: 18296
I want to include a timeout duration, like "25 seconds" or "1 minute", in a user-facing message. Is there a way to do this in gwt?
From this resource, I know that I can do dates like this:
@DefaultMessage("Last update: {0,date,medium} {0,time,medium}")
String lastUpdate(Date timestamp);
but there doesn't seem to be anything like:
// hypothetical
@DefaultMessage("Requests time out after {0,duration}")
String timeout(Interval duration); // also Interval is a JodaTime concept...
Is there?
Upvotes: 1
Views: 81
Reputation: 37778
JodaTime still isn't really available for GWT (there are/were several projects, but unfortunately none ever really established itself). I hope someday we'll see JavaSE 8's new Date API in GWT!
Until then, I would use the following approach:
Upvotes: 1