Here you can find the source of appendEra(StringBuffer sb, Calendar cal)
private static void appendEra(StringBuffer sb, Calendar cal)
//package com.java2s; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { private static void appendEra(StringBuffer sb, Calendar cal) { if (cal.get(Calendar.ERA) == GregorianCalendar.BC) { sb.append(" BC"); }/*from w w w . j a v a 2 s .c om*/ } }