FileDocCategorySizeDatePackage
ChangeEra.javaAPI DocExample422Fri Mar 30 00:18:18 BST 2001None

ChangeEra

public class ChangeEra extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] s)

    SimpleDateFormat sdf = new SimpleDateFormat();
    DateFormatSymbols dfs = sdf.getDateFormatSymbols();

    String era[] = { "BCE", "CE" };
    dfs.setEras(era);
    sdf.setDateFormatSymbols(dfs);

    sdf.applyPattern("MMMM d yyyy G");
    System.out.println(sdf.format(new Date()));