locale = new Locale("et");
}
private PrettyTime newPrettyTimeWOJustNow(Date ref, Locale locale)
{
PrettyTime t = new PrettyTime(ref, locale);
List<TimeUnit> units = t.getUnits();
List<TimeFormat> formats = new ArrayList<TimeFormat>();
for (TimeUnit timeUnit : units) {
if(!(timeUnit instanceof JustNow)) {
formats.add(t.getFormat(timeUnit));
}
}
int index = 0;
t.clearUnits();
for (TimeUnit timeUnit : units) {
if(!(timeUnit instanceof JustNow)) {
t.registerUnit(timeUnit, formats.get(index));
index++;
}
}
return t;
}