Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / java / util / SimpleTimeZone.js
index c48010e..d583abc 100644 (file)
-Clazz.declarePackage ("java.util");\r
-Clazz.load (["java.util.TimeZone", "jssun.util.calendar.CalendarSystem", "$.Gregorian"], "java.util.SimpleTimeZone", ["java.lang.IllegalArgumentException", "jssun.util.calendar.CalendarUtils"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.startMonth = 0;\r
-this.startDay = 0;\r
-this.startDayOfWeek = 0;\r
-this.startTime = 0;\r
-this.startTimeMode = 0;\r
-this.endMonth = 0;\r
-this.endDay = 0;\r
-this.endDayOfWeek = 0;\r
-this.endTime = 0;\r
-this.endTimeMode = 0;\r
-this.startYear = 0;\r
-this.rawOffset = 0;\r
-this.useDaylight = false;\r
-this.monthLength = null;\r
-this.startMode = 0;\r
-this.endMode = 0;\r
-this.dstSavings = 0;\r
-this.cacheYear = 0;\r
-this.cacheStart = 0;\r
-this.cacheEnd = 0;\r
-this.serialVersionOnStream = 2;\r
-Clazz.instantialize (this, arguments);\r
-}, java.util, "SimpleTimeZone", java.util.TimeZone);\r
-Clazz.prepareFields (c$, function () {\r
-this.monthLength = java.util.SimpleTimeZone.staticMonthLength;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (rawOffset, ID) {\r
-Clazz.superConstructor (this, java.util.SimpleTimeZone, []);\r
-this.rawOffset = rawOffset;\r
-this.setID (ID);\r
-this.dstSavings = 3600000;\r
-}, "~N,~S");\r
-Clazz.makeConstructor (c$, \r
-function (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, endMonth, endDay, endDayOfWeek, endTime) {\r
-this.construct (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, 0, endMonth, endDay, endDayOfWeek, endTime, 0, 3600000);\r
-}, "~N,~S,~N,~N,~N,~N,~N,~N,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, endMonth, endDay, endDayOfWeek, endTime, dstSavings) {\r
-this.construct (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, 0, endMonth, endDay, endDayOfWeek, endTime, 0, dstSavings);\r
-}, "~N,~S,~N,~N,~N,~N,~N,~N,~N,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, startTimeMode, endMonth, endDay, endDayOfWeek, endTime, endTimeMode, dstSavings) {\r
-Clazz.superConstructor (this, java.util.SimpleTimeZone, []);\r
-this.setID (ID);\r
-this.rawOffset = rawOffset;\r
-this.startMonth = startMonth;\r
-this.startDay = startDay;\r
-this.startDayOfWeek = startDayOfWeek;\r
-this.startTime = startTime;\r
-this.startTimeMode = startTimeMode;\r
-this.endMonth = endMonth;\r
-this.endDay = endDay;\r
-this.endDayOfWeek = endDayOfWeek;\r
-this.endTime = endTime;\r
-this.endTimeMode = endTimeMode;\r
-this.dstSavings = dstSavings;\r
-this.decodeRules ();\r
-if (dstSavings <= 0) {\r
-throw  new IllegalArgumentException ("Illegal daylight saving value: " + dstSavings);\r
-}}, "~N,~S,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "setStartYear", \r
-function (year) {\r
-this.startYear = year;\r
-this.invalidateCache ();\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setStartRule", \r
-function (startMonth, startDay, startDayOfWeek, startTime) {\r
-this.startMonth = startMonth;\r
-this.startDay = startDay;\r
-this.startDayOfWeek = startDayOfWeek;\r
-this.startTime = startTime;\r
-this.startTimeMode = 0;\r
-this.decodeStartRule ();\r
-this.invalidateCache ();\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "setStartRule", \r
-function (startMonth, startDay, startTime) {\r
-this.setStartRule (startMonth, startDay, 0, startTime);\r
-}, "~N,~N,~N");\r
-Clazz.defineMethod (c$, "setStartRule", \r
-function (startMonth, startDay, startDayOfWeek, startTime, after) {\r
-if (after) {\r
-this.setStartRule (startMonth, startDay, -startDayOfWeek, startTime);\r
-} else {\r
-this.setStartRule (startMonth, -startDay, -startDayOfWeek, startTime);\r
-}}, "~N,~N,~N,~N,~B");\r
-Clazz.defineMethod (c$, "setEndRule", \r
-function (endMonth, endDay, endDayOfWeek, endTime) {\r
-this.endMonth = endMonth;\r
-this.endDay = endDay;\r
-this.endDayOfWeek = endDayOfWeek;\r
-this.endTime = endTime;\r
-this.endTimeMode = 0;\r
-this.decodeEndRule ();\r
-this.invalidateCache ();\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "setEndRule", \r
-function (endMonth, endDay, endTime) {\r
-this.setEndRule (endMonth, endDay, 0, endTime);\r
-}, "~N,~N,~N");\r
-Clazz.defineMethod (c$, "setEndRule", \r
-function (endMonth, endDay, endDayOfWeek, endTime, after) {\r
-if (after) {\r
-this.setEndRule (endMonth, endDay, -endDayOfWeek, endTime);\r
-} else {\r
-this.setEndRule (endMonth, -endDay, -endDayOfWeek, endTime);\r
-}}, "~N,~N,~N,~N,~B");\r
-Clazz.defineMethod (c$, "getOffset", \r
-function (date) {\r
-return this.getOffsets (date, null);\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getOffsets", \r
-function (date, offsets) {\r
-var offset = this.rawOffset;\r
-computeOffset : if (this.useDaylight) {\r
-{\r
-if (this.cacheStart != 0) {\r
-if (date >= this.cacheStart && date < this.cacheEnd) {\r
-offset += this.dstSavings;\r
-break computeOffset;\r
-}}}var cal = date >= -12219292800000 ? java.util.SimpleTimeZone.gcal : jssun.util.calendar.CalendarSystem.forName ("julian");\r
-var cdate = cal.newCalendarDate (java.util.TimeZone.NO_TIMEZONE);\r
-cal.getCalendarDate (date + this.rawOffset, cdate);\r
-var year = cdate.getNormalizedYear ();\r
-if (year >= this.startYear) {\r
-cdate.setTimeOfDay (0, 0, 0, 0);\r
-offset = this.getOffset (cal, cdate, year, date);\r
-}}if (offsets != null) {\r
-offsets[0] = this.rawOffset;\r
-offsets[1] = offset - this.rawOffset;\r
-}return offset;\r
-}, "~N,~A");\r
-Clazz.defineMethod (c$, "getOffset", \r
-function (era, year, month, day, dayOfWeek, millis) {\r
-if (era != 1 && era != 0) {\r
-throw  new IllegalArgumentException ("Illegal era " + era);\r
-}var y = year;\r
-if (era == 0) {\r
-y = 1 - y;\r
-}if (y >= 292278994) {\r
-y = 2800 + y % 2800;\r
-} else if (y <= -292269054) {\r
-y = jssun.util.calendar.CalendarUtils.mod (y, 28);\r
-}var m = month + 1;\r
-var cal = java.util.SimpleTimeZone.gcal;\r
-var cdate = cal.newCalendarDate (java.util.TimeZone.NO_TIMEZONE);\r
-cdate.setDate (y, m, day);\r
-var time = cal.getTime (cdate);\r
-time += millis - this.rawOffset;\r
-if (time < -12219292800000) {\r
-cal = jssun.util.calendar.CalendarSystem.forName ("julian");\r
-cdate = cal.newCalendarDate (java.util.TimeZone.NO_TIMEZONE);\r
-cdate.setNormalizedDate (y, m, day);\r
-time = cal.getTime (cdate) + millis - this.rawOffset;\r
-}if ((cdate.getNormalizedYear () != y) || (cdate.getMonth () != m) || (cdate.getDayOfMonth () != day) || (dayOfWeek < 1 || dayOfWeek > 7) || (millis < 0 || millis >= (86400000))) {\r
-throw  new IllegalArgumentException ();\r
-}if (!this.useDaylight || year < this.startYear || era != 1) {\r
-return this.rawOffset;\r
-}return this.getOffset (cal, cdate, y, time);\r
-}, "~N,~N,~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "getOffset", \r
- function (cal, cdate, year, time) {\r
-{\r
-if (this.cacheStart != 0) {\r
-if (time >= this.cacheStart && time < this.cacheEnd) {\r
-return this.rawOffset + this.dstSavings;\r
-}if (year == this.cacheYear) {\r
-return this.rawOffset;\r
-}}}var start = this.getStart (cal, cdate, year);\r
-var end = this.getEnd (cal, cdate, year);\r
-var offset = this.rawOffset;\r
-if (start <= end) {\r
-if (time >= start && time < end) {\r
-offset += this.dstSavings;\r
-}{\r
-this.cacheYear = year;\r
-this.cacheStart = start;\r
-this.cacheEnd = end;\r
-}} else {\r
-if (time < end) {\r
-start = this.getStart (cal, cdate, year - 1);\r
-if (time >= start) {\r
-offset += this.dstSavings;\r
-}} else if (time >= start) {\r
-end = this.getEnd (cal, cdate, year + 1);\r
-if (time < end) {\r
-offset += this.dstSavings;\r
-}}if (start <= end) {\r
-{\r
-this.cacheYear = this.startYear - 1;\r
-this.cacheStart = start;\r
-this.cacheEnd = end;\r
-}}}return offset;\r
-}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N,~N");\r
-Clazz.defineMethod (c$, "getStart", \r
- function (cal, cdate, year) {\r
-var time = this.startTime;\r
-if (this.startTimeMode != 2) {\r
-time -= this.rawOffset;\r
-}return this.getTransition (cal, cdate, this.startMode, year, this.startMonth, this.startDay, this.startDayOfWeek, time);\r
-}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N");\r
-Clazz.defineMethod (c$, "getEnd", \r
- function (cal, cdate, year) {\r
-var time = this.endTime;\r
-if (this.endTimeMode != 2) {\r
-time -= this.rawOffset;\r
-}if (this.endTimeMode == 0) {\r
-time -= this.dstSavings;\r
-}return this.getTransition (cal, cdate, this.endMode, year, this.endMonth, this.endDay, this.endDayOfWeek, time);\r
-}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N");\r
-Clazz.defineMethod (c$, "getTransition", \r
- function (cal, cdate, mode, year, month, dayOfMonth, dayOfWeek, timeOfDay) {\r
-cdate.setNormalizedYear (year);\r
-cdate.setMonth (month + 1);\r
-switch (mode) {\r
-case 1:\r
-cdate.setDayOfMonth (dayOfMonth);\r
-break;\r
-case 2:\r
-cdate.setDayOfMonth (1);\r
-if (dayOfMonth < 0) {\r
-cdate.setDayOfMonth (cal.getMonthLength (cdate));\r
-}cdate = cal.getNthDayOfWeek (dayOfMonth, dayOfWeek, cdate);\r
-break;\r
-case 3:\r
-cdate.setDayOfMonth (dayOfMonth);\r
-cdate = cal.getNthDayOfWeek (1, dayOfWeek, cdate);\r
-break;\r
-case 4:\r
-cdate.setDayOfMonth (dayOfMonth);\r
-cdate = cal.getNthDayOfWeek (-1, dayOfWeek, cdate);\r
-break;\r
-}\r
-return cal.getTime (cdate) + timeOfDay;\r
-}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N,~N,~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getRawOffset", \r
-function () {\r
-return this.rawOffset;\r
-});\r
-Clazz.overrideMethod (c$, "setRawOffset", \r
-function (offsetMillis) {\r
-this.rawOffset = offsetMillis;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setDSTSavings", \r
-function (millisSavedDuringDST) {\r
-if (millisSavedDuringDST <= 0) {\r
-throw  new IllegalArgumentException ("Illegal daylight saving value: " + millisSavedDuringDST);\r
-}this.dstSavings = millisSavedDuringDST;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getDSTSavings", \r
-function () {\r
-if (this.useDaylight) {\r
-return this.dstSavings;\r
-}return 0;\r
-});\r
-Clazz.overrideMethod (c$, "useDaylightTime", \r
-function () {\r
-return this.useDaylight;\r
-});\r
-Clazz.overrideMethod (c$, "inDaylightTime", \r
-function (date) {\r
-return (this.getOffset (date.getTime ()) != this.rawOffset);\r
-}, "java.util.Date");\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-return this.startMonth ^ this.startDay ^ this.startDayOfWeek ^ this.startTime ^ this.endMonth ^ this.endDay ^ this.endDayOfWeek ^ this.endTime ^ this.rawOffset;\r
-});\r
-Clazz.overrideMethod (c$, "equals", \r
-function (obj) {\r
-if (this === obj) {\r
-return true;\r
-}if (!(Clazz.instanceOf (obj, java.util.SimpleTimeZone))) {\r
-return false;\r
-}var that = obj;\r
-return this.getID ().equals (that.getID ()) && this.hasSameRules (that);\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "hasSameRules", \r
-function (other) {\r
-if (this === other) {\r
-return true;\r
-}if (!(Clazz.instanceOf (other, java.util.SimpleTimeZone))) {\r
-return false;\r
-}var that = other;\r
-return this.rawOffset == that.rawOffset && this.useDaylight == that.useDaylight && (!this.useDaylight || (this.dstSavings == that.dstSavings && this.startMode == that.startMode && this.startMonth == that.startMonth && this.startDay == that.startDay && this.startDayOfWeek == that.startDayOfWeek && this.startTime == that.startTime && this.startTimeMode == that.startTimeMode && this.endMode == that.endMode && this.endMonth == that.endMonth && this.endDay == that.endDay && this.endDayOfWeek == that.endDayOfWeek && this.endTime == that.endTime && this.endTimeMode == that.endTimeMode && this.startYear == that.startYear));\r
-}, "java.util.TimeZone");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return this.getClass ().getName () + "[id=" + this.getID () + ",offset=" + this.rawOffset + ",dstSavings=" + this.dstSavings + ",useDaylight=" + this.useDaylight + ",startYear=" + this.startYear + ",startMode=" + this.startMode + ",startMonth=" + this.startMonth + ",startDay=" + this.startDay + ",startDayOfWeek=" + this.startDayOfWeek + ",startTime=" + this.startTime + ",startTimeMode=" + this.startTimeMode + ",endMode=" + this.endMode + ",endMonth=" + this.endMonth + ",endDay=" + this.endDay + ",endDayOfWeek=" + this.endDayOfWeek + ",endTime=" + this.endTime + ",endTimeMode=" + this.endTimeMode + ']';\r
-});\r
-Clazz.defineMethod (c$, "invalidateCache", \r
- function () {\r
-this.cacheYear = this.startYear - 1;\r
-this.cacheStart = this.cacheEnd = 0;\r
-});\r
-Clazz.defineMethod (c$, "decodeRules", \r
- function () {\r
-this.decodeStartRule ();\r
-this.decodeEndRule ();\r
-});\r
-Clazz.defineMethod (c$, "decodeStartRule", \r
- function () {\r
-this.useDaylight = (this.startDay != 0) && (this.endDay != 0);\r
-if (this.startDay != 0) {\r
-if (this.startMonth < 0 || this.startMonth > 11) {\r
-throw  new IllegalArgumentException ("Illegal start month " + this.startMonth);\r
-}if (this.startTime < 0 || this.startTime > 86400000) {\r
-throw  new IllegalArgumentException ("Illegal start time " + this.startTime);\r
-}if (this.startDayOfWeek == 0) {\r
-this.startMode = 1;\r
-} else {\r
-if (this.startDayOfWeek > 0) {\r
-this.startMode = 2;\r
-} else {\r
-this.startDayOfWeek = -this.startDayOfWeek;\r
-if (this.startDay > 0) {\r
-this.startMode = 3;\r
-} else {\r
-this.startDay = -this.startDay;\r
-this.startMode = 4;\r
-}}if (this.startDayOfWeek > 7) {\r
-throw  new IllegalArgumentException ("Illegal start day of week " + this.startDayOfWeek);\r
-}}if (this.startMode == 2) {\r
-if (this.startDay < -5 || this.startDay > 5) {\r
-throw  new IllegalArgumentException ("Illegal start day of week in month " + this.startDay);\r
-}} else if (this.startDay < 1 || this.startDay > java.util.SimpleTimeZone.staticMonthLength[this.startMonth]) {\r
-throw  new IllegalArgumentException ("Illegal start day " + this.startDay);\r
-}}});\r
-Clazz.defineMethod (c$, "decodeEndRule", \r
- function () {\r
-this.useDaylight = (this.startDay != 0) && (this.endDay != 0);\r
-if (this.endDay != 0) {\r
-if (this.endMonth < 0 || this.endMonth > 11) {\r
-throw  new IllegalArgumentException ("Illegal end month " + this.endMonth);\r
-}if (this.endTime < 0 || this.endTime > 86400000) {\r
-throw  new IllegalArgumentException ("Illegal end time " + this.endTime);\r
-}if (this.endDayOfWeek == 0) {\r
-this.endMode = 1;\r
-} else {\r
-if (this.endDayOfWeek > 0) {\r
-this.endMode = 2;\r
-} else {\r
-this.endDayOfWeek = -this.endDayOfWeek;\r
-if (this.endDay > 0) {\r
-this.endMode = 3;\r
-} else {\r
-this.endDay = -this.endDay;\r
-this.endMode = 4;\r
-}}if (this.endDayOfWeek > 7) {\r
-throw  new IllegalArgumentException ("Illegal end day of week " + this.endDayOfWeek);\r
-}}if (this.endMode == 2) {\r
-if (this.endDay < -5 || this.endDay > 5) {\r
-throw  new IllegalArgumentException ("Illegal end day of week in month " + this.endDay);\r
-}} else if (this.endDay < 1 || this.endDay > java.util.SimpleTimeZone.staticMonthLength[this.endMonth]) {\r
-throw  new IllegalArgumentException ("Illegal end day " + this.endDay);\r
-}}});\r
-Clazz.defineStatics (c$,\r
-"millisPerHour", 3600000,\r
-"millisPerDay", 86400000,\r
-"staticMonthLength",  Clazz.newByteArray (-1, [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]),\r
-"staticLeapMonthLength",  Clazz.newByteArray (-1, [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]));\r
-c$.gcal = c$.prototype.gcal = jssun.util.calendar.CalendarSystem.getGregorianCalendar ();\r
-Clazz.defineStatics (c$,\r
-"DOM_MODE", 1,\r
-"DOW_IN_MONTH_MODE", 2,\r
-"DOW_GE_DOM_MODE", 3,\r
-"DOW_LE_DOM_MODE", 4,\r
-"WALL_TIME", 0,\r
-"STANDARD_TIME", 1,\r
-"UTC_TIME", 2,\r
-"currentSerialVersion", 2);\r
-});\r
+Clazz.declarePackage ("java.util");
+Clazz.load (["java.util.TimeZone", "jssun.util.calendar.CalendarSystem", "$.Gregorian"], "java.util.SimpleTimeZone", ["java.lang.IllegalArgumentException", "jssun.util.calendar.CalendarUtils"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.startMonth = 0;
+this.startDay = 0;
+this.startDayOfWeek = 0;
+this.startTime = 0;
+this.startTimeMode = 0;
+this.endMonth = 0;
+this.endDay = 0;
+this.endDayOfWeek = 0;
+this.endTime = 0;
+this.endTimeMode = 0;
+this.startYear = 0;
+this.rawOffset = 0;
+this.useDaylight = false;
+this.monthLength = null;
+this.startMode = 0;
+this.endMode = 0;
+this.dstSavings = 0;
+this.cacheYear = 0;
+this.cacheStart = 0;
+this.cacheEnd = 0;
+this.serialVersionOnStream = 2;
+Clazz.instantialize (this, arguments);
+}, java.util, "SimpleTimeZone", java.util.TimeZone);
+Clazz.prepareFields (c$, function () {
+this.monthLength = java.util.SimpleTimeZone.staticMonthLength;
+});
+Clazz.makeConstructor (c$, 
+function (rawOffset, ID) {
+Clazz.superConstructor (this, java.util.SimpleTimeZone, []);
+this.rawOffset = rawOffset;
+this.setID (ID);
+this.dstSavings = 3600000;
+}, "~N,~S");
+Clazz.makeConstructor (c$, 
+function (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, endMonth, endDay, endDayOfWeek, endTime) {
+this.construct (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, 0, endMonth, endDay, endDayOfWeek, endTime, 0, 3600000);
+}, "~N,~S,~N,~N,~N,~N,~N,~N,~N,~N");
+Clazz.makeConstructor (c$, 
+function (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, endMonth, endDay, endDayOfWeek, endTime, dstSavings) {
+this.construct (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, 0, endMonth, endDay, endDayOfWeek, endTime, 0, dstSavings);
+}, "~N,~S,~N,~N,~N,~N,~N,~N,~N,~N,~N");
+Clazz.makeConstructor (c$, 
+function (rawOffset, ID, startMonth, startDay, startDayOfWeek, startTime, startTimeMode, endMonth, endDay, endDayOfWeek, endTime, endTimeMode, dstSavings) {
+Clazz.superConstructor (this, java.util.SimpleTimeZone, []);
+this.setID (ID);
+this.rawOffset = rawOffset;
+this.startMonth = startMonth;
+this.startDay = startDay;
+this.startDayOfWeek = startDayOfWeek;
+this.startTime = startTime;
+this.startTimeMode = startTimeMode;
+this.endMonth = endMonth;
+this.endDay = endDay;
+this.endDayOfWeek = endDayOfWeek;
+this.endTime = endTime;
+this.endTimeMode = endTimeMode;
+this.dstSavings = dstSavings;
+this.decodeRules ();
+if (dstSavings <= 0) {
+throw  new IllegalArgumentException ("Illegal daylight saving value: " + dstSavings);
+}}, "~N,~S,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
+Clazz.defineMethod (c$, "setStartYear", 
+function (year) {
+this.startYear = year;
+this.invalidateCache ();
+}, "~N");
+Clazz.defineMethod (c$, "setStartRule", 
+function (startMonth, startDay, startDayOfWeek, startTime) {
+this.startMonth = startMonth;
+this.startDay = startDay;
+this.startDayOfWeek = startDayOfWeek;
+this.startTime = startTime;
+this.startTimeMode = 0;
+this.decodeStartRule ();
+this.invalidateCache ();
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "setStartRule", 
+function (startMonth, startDay, startTime) {
+this.setStartRule (startMonth, startDay, 0, startTime);
+}, "~N,~N,~N");
+Clazz.defineMethod (c$, "setStartRule", 
+function (startMonth, startDay, startDayOfWeek, startTime, after) {
+if (after) {
+this.setStartRule (startMonth, startDay, -startDayOfWeek, startTime);
+} else {
+this.setStartRule (startMonth, -startDay, -startDayOfWeek, startTime);
+}}, "~N,~N,~N,~N,~B");
+Clazz.defineMethod (c$, "setEndRule", 
+function (endMonth, endDay, endDayOfWeek, endTime) {
+this.endMonth = endMonth;
+this.endDay = endDay;
+this.endDayOfWeek = endDayOfWeek;
+this.endTime = endTime;
+this.endTimeMode = 0;
+this.decodeEndRule ();
+this.invalidateCache ();
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "setEndRule", 
+function (endMonth, endDay, endTime) {
+this.setEndRule (endMonth, endDay, 0, endTime);
+}, "~N,~N,~N");
+Clazz.defineMethod (c$, "setEndRule", 
+function (endMonth, endDay, endDayOfWeek, endTime, after) {
+if (after) {
+this.setEndRule (endMonth, endDay, -endDayOfWeek, endTime);
+} else {
+this.setEndRule (endMonth, -endDay, -endDayOfWeek, endTime);
+}}, "~N,~N,~N,~N,~B");
+Clazz.defineMethod (c$, "getOffset", 
+function (date) {
+return this.getOffsets (date, null);
+}, "~N");
+Clazz.overrideMethod (c$, "getOffsets", 
+function (date, offsets) {
+var offset = this.rawOffset;
+computeOffset : if (this.useDaylight) {
+{
+if (this.cacheStart != 0) {
+if (date >= this.cacheStart && date < this.cacheEnd) {
+offset += this.dstSavings;
+break computeOffset;
+}}}var cal = date >= -12219292800000 ? java.util.SimpleTimeZone.gcal : jssun.util.calendar.CalendarSystem.forName ("julian");
+var cdate = cal.newCalendarDate (java.util.TimeZone.NO_TIMEZONE);
+cal.getCalendarDate (date + this.rawOffset, cdate);
+var year = cdate.getNormalizedYear ();
+if (year >= this.startYear) {
+cdate.setTimeOfDay (0, 0, 0, 0);
+offset = this.getOffset (cal, cdate, year, date);
+}}if (offsets != null) {
+offsets[0] = this.rawOffset;
+offsets[1] = offset - this.rawOffset;
+}return offset;
+}, "~N,~A");
+Clazz.defineMethod (c$, "getOffset", 
+function (era, year, month, day, dayOfWeek, millis) {
+if (era != 1 && era != 0) {
+throw  new IllegalArgumentException ("Illegal era " + era);
+}var y = year;
+if (era == 0) {
+y = 1 - y;
+}if (y >= 292278994) {
+y = 2800 + y % 2800;
+} else if (y <= -292269054) {
+y = jssun.util.calendar.CalendarUtils.mod (y, 28);
+}var m = month + 1;
+var cal = java.util.SimpleTimeZone.gcal;
+var cdate = cal.newCalendarDate (java.util.TimeZone.NO_TIMEZONE);
+cdate.setDate (y, m, day);
+var time = cal.getTime (cdate);
+time += millis - this.rawOffset;
+if (time < -12219292800000) {
+cal = jssun.util.calendar.CalendarSystem.forName ("julian");
+cdate = cal.newCalendarDate (java.util.TimeZone.NO_TIMEZONE);
+cdate.setNormalizedDate (y, m, day);
+time = cal.getTime (cdate) + millis - this.rawOffset;
+}if ((cdate.getNormalizedYear () != y) || (cdate.getMonth () != m) || (cdate.getDayOfMonth () != day) || (dayOfWeek < 1 || dayOfWeek > 7) || (millis < 0 || millis >= (86400000))) {
+throw  new IllegalArgumentException ();
+}if (!this.useDaylight || year < this.startYear || era != 1) {
+return this.rawOffset;
+}return this.getOffset (cal, cdate, y, time);
+}, "~N,~N,~N,~N,~N,~N");
+Clazz.defineMethod (c$, "getOffset", 
+ function (cal, cdate, year, time) {
+{
+if (this.cacheStart != 0) {
+if (time >= this.cacheStart && time < this.cacheEnd) {
+return this.rawOffset + this.dstSavings;
+}if (year == this.cacheYear) {
+return this.rawOffset;
+}}}var start = this.getStart (cal, cdate, year);
+var end = this.getEnd (cal, cdate, year);
+var offset = this.rawOffset;
+if (start <= end) {
+if (time >= start && time < end) {
+offset += this.dstSavings;
+}{
+this.cacheYear = year;
+this.cacheStart = start;
+this.cacheEnd = end;
+}} else {
+if (time < end) {
+start = this.getStart (cal, cdate, year - 1);
+if (time >= start) {
+offset += this.dstSavings;
+}} else if (time >= start) {
+end = this.getEnd (cal, cdate, year + 1);
+if (time < end) {
+offset += this.dstSavings;
+}}if (start <= end) {
+{
+this.cacheYear = this.startYear - 1;
+this.cacheStart = start;
+this.cacheEnd = end;
+}}}return offset;
+}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N,~N");
+Clazz.defineMethod (c$, "getStart", 
+ function (cal, cdate, year) {
+var time = this.startTime;
+if (this.startTimeMode != 2) {
+time -= this.rawOffset;
+}return this.getTransition (cal, cdate, this.startMode, year, this.startMonth, this.startDay, this.startDayOfWeek, time);
+}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N");
+Clazz.defineMethod (c$, "getEnd", 
+ function (cal, cdate, year) {
+var time = this.endTime;
+if (this.endTimeMode != 2) {
+time -= this.rawOffset;
+}if (this.endTimeMode == 0) {
+time -= this.dstSavings;
+}return this.getTransition (cal, cdate, this.endMode, year, this.endMonth, this.endDay, this.endDayOfWeek, time);
+}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N");
+Clazz.defineMethod (c$, "getTransition", 
+ function (cal, cdate, mode, year, month, dayOfMonth, dayOfWeek, timeOfDay) {
+cdate.setNormalizedYear (year);
+cdate.setMonth (month + 1);
+switch (mode) {
+case 1:
+cdate.setDayOfMonth (dayOfMonth);
+break;
+case 2:
+cdate.setDayOfMonth (1);
+if (dayOfMonth < 0) {
+cdate.setDayOfMonth (cal.getMonthLength (cdate));
+}cdate = cal.getNthDayOfWeek (dayOfMonth, dayOfWeek, cdate);
+break;
+case 3:
+cdate.setDayOfMonth (dayOfMonth);
+cdate = cal.getNthDayOfWeek (1, dayOfWeek, cdate);
+break;
+case 4:
+cdate.setDayOfMonth (dayOfMonth);
+cdate = cal.getNthDayOfWeek (-1, dayOfWeek, cdate);
+break;
+}
+return cal.getTime (cdate) + timeOfDay;
+}, "jssun.util.calendar.BaseCalendar,jssun.util.calendar.BaseCalendar.Date,~N,~N,~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getRawOffset", 
+function () {
+return this.rawOffset;
+});
+Clazz.overrideMethod (c$, "setRawOffset", 
+function (offsetMillis) {
+this.rawOffset = offsetMillis;
+}, "~N");
+Clazz.defineMethod (c$, "setDSTSavings", 
+function (millisSavedDuringDST) {
+if (millisSavedDuringDST <= 0) {
+throw  new IllegalArgumentException ("Illegal daylight saving value: " + millisSavedDuringDST);
+}this.dstSavings = millisSavedDuringDST;
+}, "~N");
+Clazz.overrideMethod (c$, "getDSTSavings", 
+function () {
+if (this.useDaylight) {
+return this.dstSavings;
+}return 0;
+});
+Clazz.overrideMethod (c$, "useDaylightTime", 
+function () {
+return this.useDaylight;
+});
+Clazz.overrideMethod (c$, "inDaylightTime", 
+function (date) {
+return (this.getOffset (date.getTime ()) != this.rawOffset);
+}, "java.util.Date");
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+return this.startMonth ^ this.startDay ^ this.startDayOfWeek ^ this.startTime ^ this.endMonth ^ this.endDay ^ this.endDayOfWeek ^ this.endTime ^ this.rawOffset;
+});
+Clazz.overrideMethod (c$, "equals", 
+function (obj) {
+if (this === obj) {
+return true;
+}if (!(Clazz.instanceOf (obj, java.util.SimpleTimeZone))) {
+return false;
+}var that = obj;
+return this.getID ().equals (that.getID ()) && this.hasSameRules (that);
+}, "~O");
+Clazz.overrideMethod (c$, "hasSameRules", 
+function (other) {
+if (this === other) {
+return true;
+}if (!(Clazz.instanceOf (other, java.util.SimpleTimeZone))) {
+return false;
+}var that = other;
+return this.rawOffset == that.rawOffset && this.useDaylight == that.useDaylight && (!this.useDaylight || (this.dstSavings == that.dstSavings && this.startMode == that.startMode && this.startMonth == that.startMonth && this.startDay == that.startDay && this.startDayOfWeek == that.startDayOfWeek && this.startTime == that.startTime && this.startTimeMode == that.startTimeMode && this.endMode == that.endMode && this.endMonth == that.endMonth && this.endDay == that.endDay && this.endDayOfWeek == that.endDayOfWeek && this.endTime == that.endTime && this.endTimeMode == that.endTimeMode && this.startYear == that.startYear));
+}, "java.util.TimeZone");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return this.getClass ().getName () + "[id=" + this.getID () + ",offset=" + this.rawOffset + ",dstSavings=" + this.dstSavings + ",useDaylight=" + this.useDaylight + ",startYear=" + this.startYear + ",startMode=" + this.startMode + ",startMonth=" + this.startMonth + ",startDay=" + this.startDay + ",startDayOfWeek=" + this.startDayOfWeek + ",startTime=" + this.startTime + ",startTimeMode=" + this.startTimeMode + ",endMode=" + this.endMode + ",endMonth=" + this.endMonth + ",endDay=" + this.endDay + ",endDayOfWeek=" + this.endDayOfWeek + ",endTime=" + this.endTime + ",endTimeMode=" + this.endTimeMode + ']';
+});
+Clazz.defineMethod (c$, "invalidateCache", 
+ function () {
+this.cacheYear = this.startYear - 1;
+this.cacheStart = this.cacheEnd = 0;
+});
+Clazz.defineMethod (c$, "decodeRules", 
+ function () {
+this.decodeStartRule ();
+this.decodeEndRule ();
+});
+Clazz.defineMethod (c$, "decodeStartRule", 
+ function () {
+this.useDaylight = (this.startDay != 0) && (this.endDay != 0);
+if (this.startDay != 0) {
+if (this.startMonth < 0 || this.startMonth > 11) {
+throw  new IllegalArgumentException ("Illegal start month " + this.startMonth);
+}if (this.startTime < 0 || this.startTime > 86400000) {
+throw  new IllegalArgumentException ("Illegal start time " + this.startTime);
+}if (this.startDayOfWeek == 0) {
+this.startMode = 1;
+} else {
+if (this.startDayOfWeek > 0) {
+this.startMode = 2;
+} else {
+this.startDayOfWeek = -this.startDayOfWeek;
+if (this.startDay > 0) {
+this.startMode = 3;
+} else {
+this.startDay = -this.startDay;
+this.startMode = 4;
+}}if (this.startDayOfWeek > 7) {
+throw  new IllegalArgumentException ("Illegal start day of week " + this.startDayOfWeek);
+}}if (this.startMode == 2) {
+if (this.startDay < -5 || this.startDay > 5) {
+throw  new IllegalArgumentException ("Illegal start day of week in month " + this.startDay);
+}} else if (this.startDay < 1 || this.startDay > java.util.SimpleTimeZone.staticMonthLength[this.startMonth]) {
+throw  new IllegalArgumentException ("Illegal start day " + this.startDay);
+}}});
+Clazz.defineMethod (c$, "decodeEndRule", 
+ function () {
+this.useDaylight = (this.startDay != 0) && (this.endDay != 0);
+if (this.endDay != 0) {
+if (this.endMonth < 0 || this.endMonth > 11) {
+throw  new IllegalArgumentException ("Illegal end month " + this.endMonth);
+}if (this.endTime < 0 || this.endTime > 86400000) {
+throw  new IllegalArgumentException ("Illegal end time " + this.endTime);
+}if (this.endDayOfWeek == 0) {
+this.endMode = 1;
+} else {
+if (this.endDayOfWeek > 0) {
+this.endMode = 2;
+} else {
+this.endDayOfWeek = -this.endDayOfWeek;
+if (this.endDay > 0) {
+this.endMode = 3;
+} else {
+this.endDay = -this.endDay;
+this.endMode = 4;
+}}if (this.endDayOfWeek > 7) {
+throw  new IllegalArgumentException ("Illegal end day of week " + this.endDayOfWeek);
+}}if (this.endMode == 2) {
+if (this.endDay < -5 || this.endDay > 5) {
+throw  new IllegalArgumentException ("Illegal end day of week in month " + this.endDay);
+}} else if (this.endDay < 1 || this.endDay > java.util.SimpleTimeZone.staticMonthLength[this.endMonth]) {
+throw  new IllegalArgumentException ("Illegal end day " + this.endDay);
+}}});
+Clazz.defineStatics (c$,
+"millisPerHour", 3600000,
+"millisPerDay", 86400000,
+"staticMonthLength",  Clazz.newByteArray (-1, [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]),
+"staticLeapMonthLength",  Clazz.newByteArray (-1, [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]));
+c$.gcal = c$.prototype.gcal = jssun.util.calendar.CalendarSystem.getGregorianCalendar ();
+Clazz.defineStatics (c$,
+"DOM_MODE", 1,
+"DOW_IN_MONTH_MODE", 2,
+"DOW_GE_DOM_MODE", 3,
+"DOW_LE_DOM_MODE", 4,
+"WALL_TIME", 0,
+"STANDARD_TIME", 1,
+"UTC_TIME", 2,
+"currentSerialVersion", 2);
+});