Java Doc for SimpleTimeZone.java in  » Internationalization-Localization » icu4j » com » ibm » icu » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Internationalization Localization » icu4j » com.ibm.icu.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.util.TimeZone
      com.ibm.icu.impl.JDKTimeZone
         com.ibm.icu.util.SimpleTimeZone

SimpleTimeZone
public class SimpleTimeZone extends JDKTimeZone (Code)
SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar. This class does not handle historical changes.

Use a negative value for dayOfWeekInMonth to indicate that SimpleTimeZone should count from the end of the month backwards. For example, Daylight Savings Time ends at the last (dayOfWeekInMonth = -1) Sunday in October, at 2 AM in standard time.
See Also:   Calendar
See Also:   GregorianCalendar
See Also:   TimeZone
author:
   David Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu




Constructor Summary
public  SimpleTimeZone(int rawOffset, String ID)
     Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID.
public  SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime)
     Construct a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, time to start and end the daylight time.
public  SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int dstSavings)
     Constructor.
public  SimpleTimeZone(java.util.SimpleTimeZone tz, String ID)
     Constructs a SimpleTimeZone that wraps the given java.util.SimpleTimeZone.
public  SimpleTimeZone(int raw, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int startTimeMode, int endMonth, int endDay, int endDayOfWeek, int endTime, int endTimeMode, int dst)
    

Method Summary
public  Objectclone()
     Return a clone of this time zone.
public  booleanequals(Object obj)
     Return true if obj is a SimpleTimeZone equivalent to this.
public  intgetDSTSavings()
     Returns the amount of time in ms that the clock is advanced during DST. the number of milliseconds the time isadvanced with respect to standard time when the daylight savings rulesare in effect.
public  intgetOffset(int era, int year, int month, int day, int dayOfWeek, int millis)
    
public  intgetOffset(int era, int year, int month, int day, int dayOfWeek, int millis, int monthLength)
    
 intgetOffset(int era, int year, int month, int day, int dayOfWeek, int millis, int monthLength, int prevMonthLength)
    
public  intgetRawOffset()
     get the raw offset.
public  booleanhasSameRules(TimeZone othr)
    
public  inthashCode()
     Return the hash code.
public  booleaninDaylightTime(Date date)
    
public  voidsetDSTSavings(int millisSavedDuringDST)
     Sets the amount of time in ms that the clock is advanced during DST.
Parameters:
  millisSavedDuringDST - the number of milliseconds the time isadvanced with respect to standard time when the daylight savings rulesare in effect.
public  voidsetEndRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time)
     Sets the daylight savings ending rule.
public  voidsetEndRule(int month, int dayOfMonth, int time)
     Sets the DST end rule to a fixed date within a month.
public  voidsetEndRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after)
     Sets the DST end rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
Parameters:
  month - The month in which this rule occurs (0-based).
Parameters:
  dayOfMonth - A date within that month (1-based).
Parameters:
  dayOfWeek - The day of the week on which this rule occurs.
Parameters:
  time - The time of that day (number of millis after midnight)when DST ends in local wall time, which is daylighttime in this case.
Parameters:
  after - If true, this rule selects the first dayOfWeek onor after dayOfMonth.
public  voidsetRawOffset(int offsetMillis)
     Set the raw offset.
public  voidsetStartRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time)
     Sets the daylight savings starting rule.
public  voidsetStartRule(int month, int dayOfMonth, int time)
     Sets the DST start rule to a fixed date within a month.
public  voidsetStartRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after)
     Sets the DST start rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
Parameters:
  month - The month in which this rule occurs (0-based).
Parameters:
  dayOfMonth - A date within that month (1-based).
Parameters:
  dayOfWeek - The day of the week on which this rule occurs.
Parameters:
  time - The time of that day (number of millis after midnight)when DST takes effect in local wall time, which isstandard time in this case.
Parameters:
  after - If true, this rule selects the first dayOfWeek onor after dayOfMonth.
public  voidsetStartYear(int year)
     Sets the daylight savings starting year.
public  StringtoString()
     Returns a string representation of this object.
public  booleanuseDaylightTime()
    


Constructor Detail
SimpleTimeZone
public SimpleTimeZone(int rawOffset, String ID)(Code)
Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID. Timezone IDs can be obtained from TimeZone.getAvailableIDs. Normally you should use TimeZone.getDefault to construct a TimeZone.
Parameters:
  rawOffset - The given base time zone offset to GMT.
Parameters:
  ID - The time zone ID which is obtained fromTimeZone.getAvailableIDs.



SimpleTimeZone
public SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime)(Code)
Construct a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, time to start and end the daylight time. Timezone IDs can be obtained from TimeZone.getAvailableIDs. Normally you should use TimeZone.getDefault to create a TimeZone. For a time zone that does not use daylight saving time, do not use this constructor; instead you should use SimpleTimeZone(rawOffset, ID). By default, this constructor specifies day-of-week-in-month rules. That is, if the startDay is 1, and the startDayOfWeek is SUNDAY, then this indicates the first Sunday in the startMonth. A startDay of -1 likewise indicates the last Sunday. However, by using negative or zero values for certain parameters, other types of rules can be specified. Day of month. To specify an exact day of the month, such as March 1, set startDayOfWeek to zero. Day of week after day of month. To specify the first day of the week occurring on or after an exact day of the month, make the day of the week negative. For example, if startDay is 5 and startDayOfWeek is -MONDAY, this indicates the first Monday on or after the 5th day of the startMonth. Day of week before day of month. To specify the last day of the week occurring on or before an exact day of the month, make the day of the week and the day of the month negative. For example, if startDay is -21 and startDayOfWeek is -WEDNESDAY, this indicates the last Wednesday on or before the 21st of the startMonth. The above examples refer to the startMonth, startDay, and startDayOfWeek; the same applies for the endMonth, endDay, and endDayOfWeek.
Parameters:
  rawOffset - The given base time zone offset to GMT.
Parameters:
  ID - The time zone ID which is obtained fromTimeZone.getAvailableIDs.
Parameters:
  startMonth - The daylight savings starting month. Month is0-based. eg, 0 for January.
Parameters:
  startDay - The daylight savings startingday-of-week-in-month. Please see the memberdescription for an example.
Parameters:
  startDayOfWeek - The daylight savings starting day-of-week. Pleasesee the member description for an example.
Parameters:
  startTime - The daylight savings starting time in local walltime, which is standard time in this case. Please see themember description for an example.
Parameters:
  endMonth - The daylight savings ending month. Month is0-based. eg, 0 for January.
Parameters:
  endDay - The daylight savings ending day-of-week-in-month.Please see the member description for an example.
Parameters:
  endDayOfWeek - The daylight savings ending day-of-week. Pleasesee the member description for an example.
Parameters:
  endTime - The daylight savings ending time in local wall time,which is daylight time in this case. Please see themember description for an example.
exception:
  IllegalArgumentException - the month, day, dayOfWeek, or timeparameters are out of range for the start or end rule



SimpleTimeZone
public SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int dstSavings)(Code)
Constructor. This constructor is identical to the 10-argument constructor, but also takes a dstSavings parameter.
Parameters:
  dstSavings - The amount of time in ms saved during DST.
exception:
  IllegalArgumentException - the month, day, dayOfWeek, or timeparameters are out of range for the start or end rule



SimpleTimeZone
public SimpleTimeZone(java.util.SimpleTimeZone tz, String ID)(Code)
Constructs a SimpleTimeZone that wraps the given java.util.SimpleTimeZone. Do not call; use the TimeZone API.



SimpleTimeZone
public SimpleTimeZone(int raw, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int startTimeMode, int endMonth, int endDay, int endDayOfWeek, int endTime, int endTimeMode, int dst)(Code)




Method Detail
clone
public Object clone()(Code)
Return a clone of this time zone. a clone of this time zone



equals
public boolean equals(Object obj)(Code)
Return true if obj is a SimpleTimeZone equivalent to this. true if obj is a SimpleTimeZone equivalent to this



getDSTSavings
public int getDSTSavings()(Code)
Returns the amount of time in ms that the clock is advanced during DST. the number of milliseconds the time isadvanced with respect to standard time when the daylight savings rulesare in effect. A positive number, typically one hour (3600000).



getOffset
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis)(Code)



getOffset
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis, int monthLength)(Code)



getOffset
int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis, int monthLength, int prevMonthLength)(Code)



getRawOffset
public int getRawOffset()(Code)
get the raw offset. the raw offset



hasSameRules
public boolean hasSameRules(TimeZone othr)(Code)



hashCode
public int hashCode()(Code)
Return the hash code. the hash code



inDaylightTime
public boolean inDaylightTime(Date date)(Code)



setDSTSavings
public void setDSTSavings(int millisSavedDuringDST)(Code)
Sets the amount of time in ms that the clock is advanced during DST.
Parameters:
  millisSavedDuringDST - the number of milliseconds the time isadvanced with respect to standard time when the daylight savings rulesare in effect. A positive number, typically one hour (3600000).



setEndRule
public void setEndRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time)(Code)
Sets the daylight savings ending rule. For example, Daylight Savings Time ends at the last (-1) Sunday in October, at 2 AM in standard time. Therefore, you can set the end rule by calling: setEndRule(TimeFields.OCTOBER, -1, TimeFields.SUNDAY, 2*60*60*1000);
Parameters:
  month - The daylight savings ending month. Month is0-based. eg, 0 for January.
Parameters:
  dayOfWeekInMonth - The daylight savings endingday-of-week-in-month. Please see the memberdescription for an example.
Parameters:
  dayOfWeek - The daylight savings ending day-of-week. Pleasesee the member description for an example.
Parameters:
  time - The daylight savings ending time in local wall time,which is daylight time in this case. Please see themember description for an example.
exception:
  IllegalArgumentException - the month, dayOfWeekInMonth,dayOfWeek, or time parameters are out of range



setEndRule
public void setEndRule(int month, int dayOfMonth, int time)(Code)
Sets the DST end rule to a fixed date within a month.
Parameters:
  month - The month in which this rule occurs (0-based).
Parameters:
  dayOfMonth - The date in that month (1-based).
Parameters:
  time - The time of that day (number of millis after midnight)when DST ends in local wall time, which is daylighttime in this case.
exception:
  IllegalArgumentException - the month,dayOfMonth, or time parameters are out of range



setEndRule
public void setEndRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after)(Code)
Sets the DST end rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
Parameters:
  month - The month in which this rule occurs (0-based).
Parameters:
  dayOfMonth - A date within that month (1-based).
Parameters:
  dayOfWeek - The day of the week on which this rule occurs.
Parameters:
  time - The time of that day (number of millis after midnight)when DST ends in local wall time, which is daylighttime in this case.
Parameters:
  after - If true, this rule selects the first dayOfWeek onor after dayOfMonth. If false, this rule selectsthe last dayOfWeek on or before dayOfMonth.
exception:
  IllegalArgumentException - the month, dayOfMonth,dayOfWeek, or time parameters are out of range



setRawOffset
public void setRawOffset(int offsetMillis)(Code)
Set the raw offset.
Parameters:
  offsetMillis - the raw offset of the time zone



setStartRule
public void setStartRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time)(Code)
Sets the daylight savings starting rule. For example, Daylight Savings Time starts at the first Sunday in April, at 2 AM in standard time. Therefore, you can set the start rule by calling: setStartRule(TimeFields.APRIL, 1, TimeFields.SUNDAY, 2*60*60*1000);
Parameters:
  month - The daylight savings starting month. Month is0-based. eg, 0 for January.
Parameters:
  dayOfWeekInMonth - The daylight savings startingday-of-week-in-month. Please see the memberdescription for an example.
Parameters:
  dayOfWeek - The daylight savings starting day-of-week.Please see the member description for anexample.
Parameters:
  time - The daylight savings starting time in local walltime, which is standard time in this case. Please seethe member description for an example.
exception:
  IllegalArgumentException - the month, dayOfWeekInMonth,dayOfWeek, or time parameters are out of range



setStartRule
public void setStartRule(int month, int dayOfMonth, int time)(Code)
Sets the DST start rule to a fixed date within a month.
Parameters:
  month - The month in which this rule occurs (0-based).
Parameters:
  dayOfMonth - The date in that month (1-based).
Parameters:
  time - The time of that day (number of millis after midnight)when DST takes effect in local wall time, which isstandard time in this case.
exception:
  IllegalArgumentException - the month,dayOfMonth, or time parameters are out of range



setStartRule
public void setStartRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after)(Code)
Sets the DST start rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
Parameters:
  month - The month in which this rule occurs (0-based).
Parameters:
  dayOfMonth - A date within that month (1-based).
Parameters:
  dayOfWeek - The day of the week on which this rule occurs.
Parameters:
  time - The time of that day (number of millis after midnight)when DST takes effect in local wall time, which isstandard time in this case.
Parameters:
  after - If true, this rule selects the first dayOfWeek onor after dayOfMonth. If false, this rule selectsthe last dayOfWeek on or before dayOfMonth.
exception:
  IllegalArgumentException - the month, dayOfMonth,dayOfWeek, or time parameters are out of range



setStartYear
public void setStartYear(int year)(Code)
Sets the daylight savings starting year.
Parameters:
  year - The daylight savings starting year.



toString
public String toString()(Code)
Returns a string representation of this object. a string representation of this object



useDaylightTime
public boolean useDaylightTime()(Code)



Fields inherited from com.ibm.icu.impl.JDKTimeZone
protected transient OlsonTimeZone zone(Code)(Java Doc)

Methods inherited from com.ibm.icu.impl.JDKTimeZone
public Object clone()(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public int getDSTSavings()(Code)(Java Doc)
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)(Code)(Java Doc)
public void getOffset(long date, boolean local, int[] offsets)(Code)(Java Doc)
public int getRawOffset()(Code)(Java Doc)
public boolean hasSameRules(TimeZone other)(Code)(Java Doc)
public synchronized int hashCode()(Code)(Java Doc)
public boolean inDaylightTime(Date date)(Code)(Java Doc)
public void setID(String ID)(Code)(Java Doc)
public void setRawOffset(int offsetMillis)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public boolean useDaylightTime()(Code)(Java Doc)
public static TimeZone wrap(java.util.TimeZone tz)(Code)(Java Doc)

Fields inherited from com.ibm.icu.util.TimeZone
final static int[][] GREGORIAN_MONTH_COUNT(Code)(Java Doc)
final public static int LONG(Code)(Java Doc)
final protected static int MILLIS_PER_DAY(Code)(Java Doc)
final protected static int MILLIS_PER_HOUR(Code)(Java Doc)
final public static int SHORT(Code)(Java Doc)

Methods inherited from com.ibm.icu.util.TimeZone
public Object clone()(Code)(Java Doc)
static void computeGregorianFields(long day, int fields)(Code)(Java Doc)
public static int countEquivalentIDs(String id)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
static long floorDivide(long numerator, long denominator)(Code)(Java Doc)
static int floorDivide(long numerator, int denominator, int[] remainder)(Code)(Java Doc)
public static String[] getAvailableIDs(int rawOffset)(Code)(Java Doc)
public static String[] getAvailableIDs(String country)(Code)(Java Doc)
public static String[] getAvailableIDs()(Code)(Java Doc)
public int getDSTSavings()(Code)(Java Doc)
public static synchronized TimeZone getDefault()(Code)(Java Doc)
final public String getDisplayName()(Code)(Java Doc)
final public String getDisplayName(Locale locale)(Code)(Java Doc)
final public String getDisplayName(ULocale locale)(Code)(Java Doc)
final public String getDisplayName(boolean daylight, int style)(Code)(Java Doc)
public String getDisplayName(boolean daylight, int style, Locale locale)(Code)(Java Doc)
public String getDisplayName(boolean daylight, int style, ULocale locale)(Code)(Java Doc)
public static String getEquivalentID(String id, int index)(Code)(Java Doc)
public String getID()(Code)(Java Doc)
abstract public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)(Code)(Java Doc)
public int getOffset(long date)(Code)(Java Doc)
public void getOffset(long date, boolean local, int[] offsets)(Code)(Java Doc)
abstract public int getRawOffset()(Code)(Java Doc)
public static synchronized TimeZone getTimeZone(String ID)(Code)(Java Doc)
public boolean hasSameRules(TimeZone other)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
abstract public boolean inDaylightTime(Date date)(Code)(Java Doc)
public static synchronized void setDefault(TimeZone tz)(Code)(Java Doc)
public void setID(String ID)(Code)(Java Doc)
abstract public void setRawOffset(int offsetMillis)(Code)(Java Doc)
abstract public boolean useDaylightTime()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.