by fdsfsdaffdsa · 11y ago · 0 comments
* Y year of era (>=0) year 1996
* x weekyear year 1996
* y year year 1996 public static void main(String[] args) {
long now = System.currentTimeMillis();
System.out.println("YYYY: " + DateTimeFormat.forPattern("YYYY").print(now));
System.out.println("yyyy: " + DateTimeFormat.forPattern("yyyy").print(now));
System.out.println("xxxx: " + DateTimeFormat.forPattern("xxxx").print(now));
}
prints YYYY: 2014
yyyy: 2014
xxxx: 2015