Re: removing the 'ago' portion?

Splash Forums PrettyTime Users removing the 'ago' portion? Re: removing the 'ago' portion?

#20407

Yes, you need to replace the default message bundle and provide your own on the classpath:

http://ocpsoft.com/prettytime/#i18n

Specifically replace this class:

http://ocpsoft.com/api/ocpsoft-pretty-time/1.0.6/com/ocpsoft/pretty/time/i18n/Resources.html

Or simply create a new locale that is specific for your use-case:

com.ocpsoft.pretty.time.i18n.CUSTOM_Resources

Then set the locale in PrettyTime to:

PrettyTime p = new PrettyTime(new Locale("CUSTOM"));