@author
264265266267268269270271
} @Test public void testYearsAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 365 * 3), locale); assertEquals("3 aastat tagasi", t.format(new Date(0))); }
271272273274275276277278
} @Test public void testYearFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("aasta pärast", t.format(new Date(1000L * 60 * 60 * 24 * 366 * 1))); }
278279280281282283284285
} @Test public void testYearAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 366 * 1), locale); assertEquals("aasta tagasi", t.format(new Date(0))); }
285286287288289290291292
} @Test public void testDecadesFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 aastakümne pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 10 * 3))); }
292293294295296297298299
} @Test public void testDecadesAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 365 * 10 * 3), locale); assertEquals("3 aastakümmet tagasi", t.format(new Date(0))); }
299300301302303304305306
} @Test public void testDecadeFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("aastakümne pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 11 * 1))); }
306307308309310311312313
} @Test public void testDecadeAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 365 * 11), locale); assertEquals("aastakümme tagasi", t.format(new Date(0))); }
313314315316317318319320
} @Test public void testCenturiesFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 sajandi pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 100 * 3))); }
320321322323324325326327
} @Test public void testCenturiesAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 365 * 100 * 3), locale); assertEquals("3 sajandit tagasi", t.format(new Date(0))); }
327328329330331332333334
} @Test public void testCenturyFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("sajandi pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 101))); }