Re: 5 minutes is default minimum duration?

Splash Forums PrettyTime Users 5 minutes is default minimum duration? Re: 5 minutes is default minimum duration?

#22875

Hey Hawleyal,

Sorry for the slow response. Yes, you can do this, but you’ll need to do a line or two of setup:

PrettyTime p = new PrettyTime();
List<TimeUnit> units = new ArrayList<TimeUnit>();
for( TimeUnit t : p.getUnits() ) {
if(!(t instanceof JustNow) {
units.add(t);
}
}
p.setUnits(units);

The reason you can’t just remove the unit is due to Thread safety issues, but now that you bring this up, I think we should improbably improve this process in the API for PrettyTime 2.0 (coming soon.)

I hope this helps,

~Lincoln