PointInTimeFormat { public static DateTimeFormatter forPattern(String pattern) { return DateTimeFormat.forPattern(pattern); } protected  PointInTimeFormat(); static DateTimeFormatter forPattern(String pattern); static DateTimeFormatter date(); static DateTimeFormatter dateTime(); static DateTimeFormatter time(); static DateTimeFormatter year(); static DateTimeFormatter monthAndYear(); static DateTimeFormatter forPointInTime(PointInTime t); static DateTimeFormatter forPrecision(Precision p);  }
@Test public void testFormatWithLowerPrecisionThanTime() { PointInTime t = new PointInTime(1984, 3, 11, 10, 56); Assert.assertEquals("03-11-84", PointInTimeFormat.forPattern("MM-dd-yy").print(t)); }
@Test public void testFormatWithHigherPrecisionThanTime() { DateTimeFormatter format = PointInTimeFormat.forPattern("MMM yyyy"); PointInTime t = new PointInTime(1975, 7); Assert.assertEquals("Jul 1975", format.print(t)); t = new PointInTime(1975); Assert.assertEquals("\ufffd 1975", format.print(t)); }