getGregorianChange(): This method is available in java.util.GregorianCalendar class of Java.
Syntax:
Date java.util.GregorianCalendar.getGregorianChange()
This method gets the Gregorian Calendar change date.
Note: This is the point when the switch from Julian dates to Gregorian dates occurred.
Parameters: NA
Returns: the Gregorian cut-over date for this GregorianCalendar object.
Exceptions: NA
Approach
Java
import java.util.GregorianCalendar;public class GregorianCalendargetGregorianChange {public static void main(String[] args) {GregorianCalendar cal = new GregorianCalendar();System.out.println(cal.getGregorianChange());}}
Output:
Fri Oct 15 05:30:00 IST 1582
No comments:
Post a Comment