Java SimpleTimeZone .setStartRule (int startMonth, int startDay, int startDayOfWeek, int startTime, boolean after)
Syntax
SimpleTimeZone.setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime, boolean after) has the following syntax.
public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime, boolean after)
Example
In the following code shows how to use SimpleTimeZone.setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime, boolean after) method.
/*from w w w .j a va 2 s.c om*/
import java.util.Calendar;
import java.util.SimpleTimeZone;
public class Main {
public static void main( String args[] ){
SimpleTimeZone stobj = new SimpleTimeZone(820,"US");
// checking initial value
System.out.println("Initial value: " + stobj);
// setting start rule
stobj.setStartRule( Calendar.MAY, 2,2, 3600000,true);
// checking the new value
System.out.println("Final value : " + stobj);
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »