Home
last modified time | relevance | path

Searched refs:Calendar (Results 1 – 25 of 247) sorted by relevance

12345678910

/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/
DCompatibilityTest.java19 import com.ibm.icu.util.Calendar;
45 java.util.Calendar jdkCal = java.util.Calendar.getInstance(jdkGMT); in TestGregorianChangeover()
47 jdkCal.set(1582, Calendar.OCTOBER, 15); in TestGregorianChangeover()
98 int y = cal.get(Calendar.YEAR), mon = cal.get(Calendar.MONTH)+1-Calendar.JANUARY, in TestGregorianChangeover()
99 dom = cal.get(Calendar.DATE), dow = cal.get(Calendar.DAY_OF_WEEK); in TestGregorianChangeover()
172 2440588, 1970, Calendar.JANUARY, 1, 1969, Calendar.DECEMBER, 19, in TestMapping()
173 2415080, 1900, Calendar.MARCH, 1, 1900, Calendar.FEBRUARY, 17, in TestMapping()
174 2451604, 2000, Calendar.FEBRUARY, 29, 2000, Calendar.FEBRUARY, 16, in TestMapping()
175 2452269, 2001, Calendar.DECEMBER, 25, 2001, Calendar.DECEMBER, 12, in TestMapping()
176 2416526, 1904, Calendar.FEBRUARY, 15, 1904, Calendar.FEBRUARY, 2, in TestMapping()
[all …]
DCalendarRegression.java24 import com.ibm.icu.util.Calendar;
83 if (cal.get(Calendar.HOUR) != 5) { in Test4031502()
86 cal.get(Calendar.DST_OFFSET) / (60*60*1000.0) + "; ZONE_OFFSET = " + in Test4031502()
87 cal.get(Calendar.ZONE_OFFSET) / (60*60*1000.0) + "; getRawOffset() = " + in Test4031502()
89 "; HOUR = " + cal.get(Calendar.HOUR)); in Test4031502()
92 if (cal.get(Calendar.HOUR) != 5) { in Test4031502()
95 cal.get(Calendar.DST_OFFSET) / (60*60*1000.0) + "; ZONE_OFFSET = " + in Test4031502()
96 … cal.get(Calendar.ZONE_OFFSET) / (60*60*1000.0) + "; getRawOffset() = " + in Test4031502()
98 "; HOUR = " + cal.get(Calendar.HOUR)); in Test4031502()
102 cal.get(Calendar.HOUR); in Test4031502()
[all …]
DIBMCalendarTest.java20 import com.ibm.icu.util.Calendar;
59 2000, Calendar.MARCH, 17, 23, 0, 0, // Fri 23:00 in TestWeekend()
60 2000, Calendar.MARCH, 18, 0, -1, 0, // Fri 23:59:59.999 in TestWeekend()
61 2000, Calendar.MARCH, 18, 0, 0, 1, // Sat 00:00 in TestWeekend()
62 2000, Calendar.MARCH, 18, 15, 0, 1, // Sat 15:00 in TestWeekend()
63 2000, Calendar.MARCH, 19, 23, 0, 1, // Sun 23:00 in TestWeekend()
64 2000, Calendar.MARCH, 20, 0, -1, 1, // Sun 23:59:59.999 in TestWeekend()
65 2000, Calendar.MARCH, 20, 0, 0, 0, // Mon 00:00 in TestWeekend()
66 2000, Calendar.MARCH, 20, 8, 0, 0, // Mon 08:00 in TestWeekend()
69 2000, Calendar.MARCH, 15, 23, 0, 0, // Wed 23:00 in TestWeekend()
[all …]
DDangiTest.java11 import com.ibm.icu.util.Calendar;
72 Calendar cal = Calendar.getInstance(new ULocale("ko_KR@calendar=dangi")); in TestMapping()
77 Calendar grego = Calendar.getInstance(); in TestMapping()
83 int y = cal.get(Calendar.EXTENDED_YEAR); in TestMapping()
84 int m = cal.get(Calendar.MONTH) + 1; // 0-based -> 1-based in TestMapping()
85 int L = cal.get(Calendar.IS_LEAP_MONTH); in TestMapping()
86 int d = cal.get(Calendar.DAY_OF_MONTH); in TestMapping()
110 cal.set(Calendar.EXTENDED_YEAR, cyear); in TestMapping()
111 cal.set(Calendar.MONTH, cmonth - 1); in TestMapping()
112 cal.set(Calendar.IS_LEAP_MONTH, cisleapmonth); in TestMapping()
[all …]
DChineseTest.java14 import com.ibm.icu.util.Calendar;
97 Calendar grego = Calendar.getInstance(); in TestMapping()
103 int y = cal.get(Calendar.EXTENDED_YEAR); in TestMapping()
104 int m = cal.get(Calendar.MONTH)+1; // 0-based -> 1-based in TestMapping()
105 int L = cal.get(Calendar.IS_LEAP_MONTH); in TestMapping()
106 int d = cal.get(Calendar.DAY_OF_MONTH); in TestMapping()
131 cal.set(Calendar.EXTENDED_YEAR, cyear); in TestMapping()
132 cal.set(Calendar.MONTH, cmonth-1); in TestMapping()
133 cal.set(Calendar.IS_LEAP_MONTH, cisleapmonth); in TestMapping()
134 cal.set(Calendar.DAY_OF_MONTH, cdayofmonth); in TestMapping()
[all …]
DHolidayTest.java14 import com.ibm.icu.util.Calendar;
38 static Calendar cal;
137 final Calendar c = Calendar.getInstance(TimeZone.GMT_ZONE); // Temporary copy in exerciseHoliday()
139 final Date fStartOfMonth = startOfMonth((Calendar)c.clone()); in exerciseHoliday()
154 c.roll(Calendar.DATE, false); in exerciseHoliday()
158 c.roll(Calendar.DATE, true); in exerciseHoliday()
159 c.add(Calendar.MONTH, 1); in exerciseHoliday()
161 c.add(Calendar.SECOND, -1); in exerciseHoliday()
205 private Date startOfMonth(/*Date dateInMonth,*/ Calendar fCalendar) in startOfMonth()
210 int era = fCalendar.get(Calendar.ERA); in startOfMonth()
[all …]
DCalendarTest.java18 import com.ibm.icu.util.Calendar;
30 public final static int SUN = Calendar.SUNDAY;
31 public final static int MON = Calendar.MONDAY;
32 public final static int TUE = Calendar.TUESDAY;
33 public final static int WED = Calendar.WEDNESDAY;
34 public final static int THU = Calendar.THURSDAY;
35 public final static int FRI = Calendar.FRIDAY;
36 public final static int SAT = Calendar.SATURDAY;
38 public final static int ERA = Calendar.ERA;
39 public final static int YEAR = Calendar.YEAR;
[all …]
DTestCase.java13 import com.ibm.icu.util.Calendar;
61 return dowToString(get(Calendar.DAY_OF_WEEK)) + " " + in toString()
62 get(Calendar.YEAR) + "/" + (get(Calendar.MONTH)+1) + "/" + in toString()
63 get(Calendar.DATE); in toString()
96 set(Calendar.ERA, era); in TestCase()
97 set(Calendar.YEAR, year); in TestCase()
98 set(Calendar.MONTH, month - 1); in TestCase()
99 set(Calendar.DATE, day); in TestCase()
100 set(Calendar.DAY_OF_WEEK, dayOfWeek); in TestCase()
101 set(Calendar.HOUR, hour); in TestCase()
[all …]
DJapaneseTest.java17 import com.ibm.icu.util.Calendar;
81 JapaneseCalendar cal = new JapaneseCalendar(1868, Calendar.JANUARY, 1); in TestCoverage()
89 … JapaneseCalendar cal = new JapaneseCalendar(JapaneseCalendar.MEIJI, 43, Calendar.JANUARY, 1); in TestCoverage()
97 JapaneseCalendar cal = new JapaneseCalendar(1868, Calendar.JANUARY, 1, 1, 1, 1); in TestCoverage()
108 cal.set(Calendar.ERA, JapaneseCalendar.MEIJI); in TestCoverage()
110 logln("min era: " + cal.getMinimum(Calendar.ERA)); in TestCoverage()
111 logln("min year: " + cal.getMinimum(Calendar.YEAR)); in TestCoverage()
112 cal.set(Calendar.YEAR, cal.getActualMaximum(Calendar.YEAR)); in TestCoverage()
114 cal.add(Calendar.YEAR, 1); in TestCoverage()
120 JapaneseCalendar cal = new JapaneseCalendar(1868, Calendar.JANUARY, 1); in TestCoverage()
[all …]
DChineseTestCase.java10 import com.ibm.icu.util.Calendar;
36 set(Calendar.ERA, era); in ChineseTestCase()
37 set(Calendar.YEAR, year); in ChineseTestCase()
38 set(Calendar.MONTH, month - 1); in ChineseTestCase()
39 set(Calendar.IS_LEAP_MONTH, isLeapMonth?1:0); in ChineseTestCase()
40 set(Calendar.DAY_OF_MONTH, dayOfMonth); in ChineseTestCase()
41 set(Calendar.DAY_OF_WEEK, dayOfWeek); in ChineseTestCase()
48 return dowToString(get(Calendar.DAY_OF_WEEK)) + in toString()
49 get(Calendar.YEAR) + "of" + get(Calendar.ERA) + in toString()
50 "/" + (get(Calendar.MONTH)+1) + in toString()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DDebugUtilitiesData.java140 com.ibm.icu.util.Calendar.ERA, /* 0 */
141 com.ibm.icu.util.Calendar.YEAR, /* 1 */
142 com.ibm.icu.util.Calendar.MONTH, /* 2 */
143 com.ibm.icu.util.Calendar.WEEK_OF_YEAR, /* 3 */
144 com.ibm.icu.util.Calendar.WEEK_OF_MONTH, /* 4 */
145 com.ibm.icu.util.Calendar.DATE, /* 5 */
146 com.ibm.icu.util.Calendar.DAY_OF_YEAR, /* 6 */
147 com.ibm.icu.util.Calendar.DAY_OF_WEEK, /* 7 */
148 com.ibm.icu.util.Calendar.DAY_OF_WEEK_IN_MONTH, /* 8 */
149 com.ibm.icu.util.Calendar.AM_PM, /* 9 */
[all …]
/external/nist-sip/java/gov/nist/javax/sip/parser/
DHeaderParser.java56 return Calendar.MONDAY; in wkday()
58 return Calendar.TUESDAY; in wkday()
60 return Calendar.WEDNESDAY; in wkday()
62 return Calendar.THURSDAY; in wkday()
64 return Calendar.FRIDAY; in wkday()
66 return Calendar.SATURDAY; in wkday()
68 return Calendar.SUNDAY; in wkday()
81 protected Calendar date() throws ParseException { in date()
83 Calendar retval = Calendar.getInstance(TimeZone.getTimeZone("GMT")); in date()
88 retval.set(Calendar.DAY_OF_MONTH, day); in date()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/data/
DHolidayBundle_en_US.java10 import java.util.Calendar;
21 … new SimpleHoliday(Calendar.JANUARY, 15, Calendar.MONDAY, "Martin Luther King Day", 1986),
23 … new SimpleHoliday(Calendar.FEBRUARY, 15, Calendar.MONDAY, "Presidents' Day", 1976),
24 …new SimpleHoliday(Calendar.FEBRUARY, 22, "Washington's Birthday", 1776, …
29 … new SimpleHoliday(Calendar.MAY, 8, Calendar.SUNDAY, "Mother's Day", 1914),
31 … new SimpleHoliday(Calendar.MAY, 31, -Calendar.MONDAY, "Memorial Day", 1971),
32 …new SimpleHoliday(Calendar.MAY, 30, "Memorial Day", 1868, …
34 … new SimpleHoliday(Calendar.JUNE, 15, Calendar.SUNDAY, "Father's Day", 1956),
35 … new SimpleHoliday(Calendar.JULY, 4, "Independence Day", 1776),
36 … new SimpleHoliday(Calendar.SEPTEMBER, 1, Calendar.MONDAY, "Labor Day", 1894),
[all …]
DHolidayBundle_fr_CA.java10 import java.util.Calendar;
19 new SimpleHoliday(Calendar.JANUARY, 1, 0, "New Year's Day"),
20 new SimpleHoliday(Calendar.MAY, 19, 0, "Victoria Day"),
21 new SimpleHoliday(Calendar.JUNE, 24, 0, "National Day"),
22 new SimpleHoliday(Calendar.JULY, 1, 0, "Canada Day"),
23 new SimpleHoliday(Calendar.AUGUST, 1, Calendar.MONDAY, "Civic Holiday"),
24 new SimpleHoliday(Calendar.SEPTEMBER, 1, Calendar.MONDAY, "Labour Day"),
25 new SimpleHoliday(Calendar.OCTOBER, 8, Calendar.MONDAY, "Thanksgiving"),
26 new SimpleHoliday(Calendar.NOVEMBER, 11, 0, "Remembrance Day"),
DHolidayBundle_en_CA.java10 import java.util.Calendar;
19 new SimpleHoliday(Calendar.MAY, 19, 0, "Victoria Day"),
20 new SimpleHoliday(Calendar.JULY, 1, 0, "Canada Day"),
21 new SimpleHoliday(Calendar.AUGUST, 1, Calendar.MONDAY, "Civic Holiday"),
22 new SimpleHoliday(Calendar.SEPTEMBER, 1, Calendar.MONDAY, "Labor Day"),
23 new SimpleHoliday(Calendar.OCTOBER, 8, Calendar.MONDAY, "Thanksgiving"),
24 new SimpleHoliday(Calendar.NOVEMBER, 11, 0, "Remembrance Day"),
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/
DTimeZoneRegression.java27 import com.ibm.icu.util.Calendar;
67 z.setStartRule(Calendar.FEBRUARY, 1, Calendar.SUNDAY, 0); in Test4073215()
68 z.setEndRule(Calendar.MARCH, -1, Calendar.SUNDAY, 0); in Test4073215()
71 Calendar tempcal = Calendar.getInstance(); in Test4073215()
74 tempcal.set(1997, Calendar.JANUARY, 31); in Test4073215()
80 tempcal.set(1997, Calendar.MARCH, 1); in Test4073215()
86 tempcal.set(1997, Calendar.MARCH, 31); in Test4073215()
105 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (2*60*60*1000)); in Test4084933()
107 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (2*60*60*1000)-1); in Test4084933()
110 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (1*60*60*1000)); in Test4084933()
[all …]
DTimeZoneBoundaryTest.java14 import com.ibm.icu.util.Calendar;
201 java.util.Calendar cal = java.util.Calendar.getInstance(); in showDate()
203 return "" + (cal.get(Calendar.YEAR) - 1900) + "/" + in showDate()
204 showNN(cal.get(Calendar.MONTH) + 1) + "/" + in showDate()
205 showNN(cal.get(Calendar.DAY_OF_MONTH)) + " " + in showDate()
206 showNN(cal.get(Calendar.HOUR_OF_DAY)) + ":" in showDate()
207 + showNN(cal.get(Calendar.MINUTE)) + " \"" + d + "\" = " + in showDate()
220 java.util.Calendar cal = java.util.Calendar.getInstance(); in showDate()
222 return "" + (cal.get(Calendar.YEAR) - 1900) + "/" + in showDate()
223 showNN(cal.get(Calendar.MONTH) + 1) + "/" + in showDate()
[all …]
DTimeZoneRuleTest.java21 import com.ibm.icu.util.Calendar;
50 Calendar.SEPTEMBER, -30, -Calendar.SATURDAY, 1*HOUR, SimpleTimeZone.WALL_TIME, in TestSimpleRuleBasedTimeZone()
51 Calendar.FEBRUARY, 2, Calendar.SUNDAY, 1*HOUR, SimpleTimeZone.WALL_TIME, in TestSimpleRuleBasedTimeZone()
66 dtr = new DateTimeRule(Calendar.SEPTEMBER, 30, Calendar.SATURDAY, false, in TestSimpleRuleBasedTimeZone()
72 dtr = new DateTimeRule(Calendar.FEBRUARY, 2, Calendar.SUNDAY, in TestSimpleRuleBasedTimeZone()
81 dtr = new DateTimeRule(Calendar.SEPTEMBER, -1, Calendar.SATURDAY, in TestSimpleRuleBasedTimeZone()
85 dtr = new DateTimeRule(Calendar.FEBRUARY, 8, Calendar.SUNDAY, true, in TestSimpleRuleBasedTimeZone()
92 dtr = new DateTimeRule(Calendar.SEPTEMBER, 30, Calendar.SATURDAY, false, in TestSimpleRuleBasedTimeZone()
96 dtr = new DateTimeRule(Calendar.FEBRUARY, 2, Calendar.SUNDAY, in TestSimpleRuleBasedTimeZone()
102 long start = getUTCMillis(STARTYEAR, Calendar.JANUARY, 1); in TestSimpleRuleBasedTimeZone()
[all …]
/external/nist-sip/java/gov/nist/javax/sip/header/
DSIPDate.java31 import java.util.Calendar;
130 private java.util.Calendar javaCal;
173 wkday = javaCal.get(Calendar.DAY_OF_WEEK); in SIPDate()
175 case Calendar.MONDAY : in SIPDate()
178 case Calendar.TUESDAY : in SIPDate()
181 case Calendar.WEDNESDAY : in SIPDate()
184 case Calendar.THURSDAY : in SIPDate()
187 case Calendar.FRIDAY : in SIPDate()
190 case Calendar.SATURDAY : in SIPDate()
193 case Calendar.SUNDAY : in SIPDate()
[all …]
/external/ksoap2/kobjects/org/ksoap2/kobjects/isodate/
DIsoDate.java38 Calendar c = Calendar.getInstance(); in dateToString()
45 int year = c.get(Calendar.YEAR); in dateToString()
51 c.get(Calendar.MONTH) - Calendar.JANUARY + 1); in dateToString()
53 dd(buf, c.get(Calendar.DAY_OF_MONTH)); in dateToString()
60 dd(buf, c.get(Calendar.HOUR_OF_DAY)); in dateToString()
62 dd(buf, c.get(Calendar.MINUTE)); in dateToString()
64 dd(buf, c.get(Calendar.SECOND)); in dateToString()
66 int ms = c.get(Calendar.MILLISECOND); in dateToString()
77 Calendar c = Calendar.getInstance(); in stringToDate()
81 Calendar.YEAR, in stringToDate()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DDateIntervalFormat.java21 import com.ibm.icu.util.Calendar;
305 private Calendar fFromCalendar;
306 private Calendar fToCalendar;
359 fFromCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat()
360 fToCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat()
371 fFromCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat()
372 fToCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat()
557 other.fFromCalendar = (Calendar) fFromCalendar.clone(); in clone()
558 other.fToCalendar = (Calendar) fToCalendar.clone(); in clone()
616 public String getPatterns(Calendar fromCalendar, in getPatterns()
[all …]
/external/xmp_toolkit/XMPCore/src/com/adobe/xmp/impl/
DXMPDateTimeImpl.java12 import java.util.Calendar;
66 public XMPDateTimeImpl(Calendar calendar) in XMPDateTimeImpl()
75 (GregorianCalendar) Calendar.getInstance(Locale.US); in XMPDateTimeImpl()
80 this.year = intCalendar.get(Calendar.YEAR); in XMPDateTimeImpl()
81 this.month = intCalendar.get(Calendar.MONTH) + 1; // cal is from 0..12 in XMPDateTimeImpl()
82 this.day = intCalendar.get(Calendar.DAY_OF_MONTH); in XMPDateTimeImpl()
83 this.hour = intCalendar.get(Calendar.HOUR_OF_DAY); in XMPDateTimeImpl()
84 this.minute = intCalendar.get(Calendar.MINUTE); in XMPDateTimeImpl()
85 this.second = intCalendar.get(Calendar.SECOND); in XMPDateTimeImpl()
86 this.nanoSeconds = intCalendar.get(Calendar.MILLISECOND) * 1000000; in XMPDateTimeImpl()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DSimpleDateRule.java38 /* package */SimpleDateRule(int month, int dayOfMonth, Calendar cal) in SimpleDateRule()
118 Calendar c = calendar; in isOn()
123 int dayOfYear = c.get(Calendar.DAY_OF_YEAR); in isOn()
125 c.setTime(computeInYear(c.get(Calendar.YEAR), c)); in isOn()
130 return c.get(Calendar.DAY_OF_YEAR) == dayOfYear; in isOn()
147 Calendar c = calendar; in doFirstBetween()
152 int year = c.get(Calendar.YEAR); in doFirstBetween()
153 int mon = c.get(Calendar.MONTH); in doFirstBetween()
177 private Date computeInYear(int year, Calendar c) in computeInYear()
181 c.set(Calendar.ERA, c.getMaximum(Calendar.ERA)); in computeInYear()
[all …]
DSimpleHoliday.java153 Calendar start = new GregorianCalendar(startYear, Calendar.JANUARY, 1); in rangeRule()
159 Date end = new GregorianCalendar(endYear, Calendar.DECEMBER, 31).getTime(); in rangeRule()
175 new SimpleHoliday(Calendar.JANUARY, 1, "New Year's Day");
183 new SimpleHoliday(Calendar.JANUARY, 6, "Epiphany");
191 new SimpleHoliday(Calendar.MAY, 1, "May Day");
199 new SimpleHoliday(Calendar.AUGUST, 15, "Assumption");
207 new SimpleHoliday(Calendar.NOVEMBER, 1, "All Saints' Day");
215 new SimpleHoliday(Calendar.NOVEMBER, 2, "All Souls' Day");
223 new SimpleHoliday(Calendar.DECEMBER, 8, "Immaculate Conception");
231 new SimpleHoliday(Calendar.DECEMBER, 24, "Christmas Eve");
[all …]
/external/icu/icu4c/source/i18n/
Ducal.cpp104 UDate d = Calendar::getNow(); in ucal_getDSTSavings()
125 return Calendar::getNow(); in ucal_getNow()
157 return (UCalendar*)Calendar::createInstance(zone, Locale(localeBuf), *status); in ucal_open()
159 return (UCalendar*)Calendar::createInstance(zone, Locale(locale), *status); in ucal_open()
166 delete (Calendar*) cal; in ucal_close()
175 Calendar* res = ((Calendar*)cal)->clone(); in ucal_clone()
199 ((Calendar*)cal)->adoptTimeZone(zone); in ucal_setTimeZone()
212 const TimeZone& tz = ((Calendar*)cal)->getTimeZone(); in ucal_getTimeZoneID()
229 const TimeZone& tz = ((Calendar*)cal)->getTimeZone(); in ucal_getTimeZoneDisplayName()
264 return ((Calendar*)cal)->inDaylightTime(*status); in ucal_inDaylightTime()
[all …]

12345678910