Java GregorianCalendar .setGregorianChange (Date date)

Syntax

GregorianCalendar.setGregorianChange(Date date) has the following syntax.

public void setGregorianChange(Date date)

Example

In the following code shows how to use GregorianCalendar.setGregorianChange(Date date) method.


// w ww .  java 2 s. c o m

import java.util.*;

public class Main {

   public static void main(String[] args) {


      GregorianCalendar cal =
              (GregorianCalendar) GregorianCalendar.getInstance();


      // set gregorian change at another date
      cal.setGregorianChange(new Date());
      System.out.println("Gregorian Change Date" + cal.getGregorianChange());

   }
}

The code above generates the following result.