Gregorian calendar class
Upcoming SlideShare
Loading in...5
×
 

Gregorian calendar class

on

  • 237 views

 

Statistics

Views

Total Views
237
Views on SlideShare
229
Embed Views
8

Actions

Likes
0
Downloads
3
Comments
0

2 Embeds 8

http://function-java.blogspot.com 7
http://www.slideee.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Gregorian calendar class Gregorian calendar class Presentation Transcript

  • GregorianCalendar Class
  • New GregorianCalendar () setGregorianChange() New GregorianCalendar (object_locale) getActualMaximum() New GregorianCalendar (year,month,day) getActualMinimum() New GregorianCalendar (year,month,day,minute) isLeapYear()
  • new GregorianCalendar () Object GregorianCalendar timezone method : new GregorianCalendar (); return type : GregorianCalendar content : Object GregorianCalendar timezone (timezone ) example : GregorianCalendar gregorian_calendar = new GregorianCalendar (); Back
  • new GregorianCalendar (object_locale) Object GregorianCalendar timezone Locale method : new GregorianCalendar ( object_locale ); return type : GregorianCalendar content : Object GregorianCalendar timezone Locale (Locale = ) example : Locale locale = new Locale ( "th", "TH" ); GregorianCalendar gregorian_calendar = new Back GregorianCalendar ( locale );
  • new GregorianCalendar(year,mon th,day) GregorianCalendar Object method : new GregorianCalendar ( year, month, day ); return type : GregorianCalendar content : Object GregorianCalendar example : GregorianCalendar gregorian_calendar = new GregorianCalendar ( 2012, 12, 12 ); Back
  • new GregorianCalendar ( year, month, day, hour, minu te ); Object GregorianCalendar method : new GregorianCalendar ( year, month, day, hour, minute ); return type : GregorianCalendar content : Object GregorianCalendar example : GregorianCalendar gregorian_calendar = new GregorianCalendar ( 2012, 12, 12, 0, 0 ); Back
  • setGregorianChange() object GregorianCalendar method : setGregorianChange ( object_date ); return type : void content : object GregorianCalendar example : GregorianCalendar gregorian_calendar = new GregorianCalendar ( 2012, 12, 12, 0, 0 ); Date date = new Date (); gregorian_calendar.setGregorianChange ( date ); Back
  • getActualMaximum() method : getActualMaximum ( calendar_constant ); return type : int content : example : GregorianCalendar gregorian_calendar = new GregorianCalendar ( 2012, 12, 12, 0, 0 ); int max_year = gregorian_calendar.getActualMaximum ( Calendar.YEAR ); int max_month = Back gregorian_calendar.getActualMaximum ( Calendar.MONTH );
  • getActualMinimum() method : getActualMinimum ( calendar_constant ); return type : int content : example : GregorianCalendar gregorian_calendar = new GregorianCalendar ( 2012, 12, 12, 0, 0 ); int min_year = gregorian_calendar.getActualMinimum ( Calendar.YEAR ); int min_month = Back gregorian_calendar.getActualMinimum ( Calendar.MONTH );
  • isLeapYear() leap year method : isLeapYear ( year ); return type : boolean content : leap year example : GregorianCalendar gregorian_calendar = new GregorianCalendar (); if ( gregorian_calendar.isLeapYear ( 2009 ) ) { System.out.println ( "2007 is leap year." ); } Back