/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/ |
D | CompatibilityTest.java | 26 import com.ibm.icu.util.Calendar; 49 java.util.Calendar jdkCal = java.util.Calendar.getInstance(jdkGMT); in TestGregorianChangeover() 51 jdkCal.set(1582, Calendar.OCTOBER, 15); in TestGregorianChangeover() 102 int y = cal.get(Calendar.YEAR), mon = cal.get(Calendar.MONTH)+1-Calendar.JANUARY, in TestGregorianChangeover() 103 dom = cal.get(Calendar.DATE), dow = cal.get(Calendar.DAY_OF_WEEK); in TestGregorianChangeover() 177 2440588, 1970, Calendar.JANUARY, 1, 1969, Calendar.DECEMBER, 19, in TestMapping() 178 2415080, 1900, Calendar.MARCH, 1, 1900, Calendar.FEBRUARY, 17, in TestMapping() 179 2451604, 2000, Calendar.FEBRUARY, 29, 2000, Calendar.FEBRUARY, 16, in TestMapping() 180 2452269, 2001, Calendar.DECEMBER, 25, 2001, Calendar.DECEMBER, 12, in TestMapping() 181 2416526, 1904, Calendar.FEBRUARY, 15, 1904, Calendar.FEBRUARY, 2, in TestMapping() [all …]
|
D | CalendarRegressionTest.java | 32 import com.ibm.icu.util.Calendar; 91 if (cal.get(Calendar.HOUR) != 5) { in Test4031502() 94 cal.get(Calendar.DST_OFFSET) / (60*60*1000.0) + "; ZONE_OFFSET = " + in Test4031502() 95 cal.get(Calendar.ZONE_OFFSET) / (60*60*1000.0) + "; getRawOffset() = " + in Test4031502() 97 "; HOUR = " + cal.get(Calendar.HOUR)); in Test4031502() 100 if (cal.get(Calendar.HOUR) != 5) { in Test4031502() 103 cal.get(Calendar.DST_OFFSET) / (60*60*1000.0) + "; ZONE_OFFSET = " + in Test4031502() 104 … cal.get(Calendar.ZONE_OFFSET) / (60*60*1000.0) + "; getRawOffset() = " + in Test4031502() 106 "; HOUR = " + cal.get(Calendar.HOUR)); in Test4031502() 110 cal.get(Calendar.HOUR); in Test4031502() [all …]
|
D | IBMCalendarTest.java | 28 import com.ibm.icu.util.Calendar; 67 2000, Calendar.MARCH, 17, 23, 0, 0, // Fri 23:00 in TestWeekend() 68 2000, Calendar.MARCH, 18, 0, -1, 0, // Fri 23:59:59.999 in TestWeekend() 69 2000, Calendar.MARCH, 18, 0, 0, 1, // Sat 00:00 in TestWeekend() 70 2000, Calendar.MARCH, 18, 15, 0, 1, // Sat 15:00 in TestWeekend() 71 2000, Calendar.MARCH, 19, 23, 0, 1, // Sun 23:00 in TestWeekend() 72 2000, Calendar.MARCH, 20, 0, -1, 1, // Sun 23:59:59.999 in TestWeekend() 73 2000, Calendar.MARCH, 20, 0, 0, 0, // Mon 00:00 in TestWeekend() 74 2000, Calendar.MARCH, 20, 8, 0, 0, // Mon 08:00 in TestWeekend() 77 2000, Calendar.MARCH, 15, 23, 0, 0, // Wed 23:00 in TestWeekend() [all …]
|
D | DangiTest.java | 17 import com.ibm.icu.util.Calendar; 75 Calendar cal = Calendar.getInstance(new ULocale("ko_KR@calendar=dangi")); in TestMapping() 80 Calendar grego = Calendar.getInstance(); in TestMapping() 86 int y = cal.get(Calendar.EXTENDED_YEAR); in TestMapping() 87 int m = cal.get(Calendar.MONTH) + 1; // 0-based -> 1-based in TestMapping() 88 int L = cal.get(Calendar.IS_LEAP_MONTH); in TestMapping() 89 int d = cal.get(Calendar.DAY_OF_MONTH); in TestMapping() 113 cal.set(Calendar.EXTENDED_YEAR, cyear); in TestMapping() 114 cal.set(Calendar.MONTH, cmonth - 1); in TestMapping() 115 cal.set(Calendar.IS_LEAP_MONTH, cisleapmonth); in TestMapping() [all …]
|
D | ChineseTest.java | 20 import com.ibm.icu.util.Calendar; 100 Calendar grego = Calendar.getInstance(); in TestMapping() 106 int y = cal.get(Calendar.EXTENDED_YEAR); in TestMapping() 107 int m = cal.get(Calendar.MONTH)+1; // 0-based -> 1-based in TestMapping() 108 int L = cal.get(Calendar.IS_LEAP_MONTH); in TestMapping() 109 int d = cal.get(Calendar.DAY_OF_MONTH); in TestMapping() 134 cal.set(Calendar.EXTENDED_YEAR, cyear); in TestMapping() 135 cal.set(Calendar.MONTH, cmonth-1); in TestMapping() 136 cal.set(Calendar.IS_LEAP_MONTH, cisleapmonth); in TestMapping() 137 cal.set(Calendar.DAY_OF_MONTH, cdayofmonth); in TestMapping() [all …]
|
D | HolidayTest.java | 20 import com.ibm.icu.util.Calendar; 45 private Calendar cal; 145 final Calendar c = Calendar.getInstance(TimeZone.GMT_ZONE); // Temporary copy in exerciseHoliday() 147 final Date fStartOfMonth = startOfMonth((Calendar)c.clone()); in exerciseHoliday() 162 c.roll(Calendar.DATE, false); in exerciseHoliday() 166 c.roll(Calendar.DATE, true); in exerciseHoliday() 167 c.add(Calendar.MONTH, 1); in exerciseHoliday() 169 c.add(Calendar.SECOND, -1); in exerciseHoliday() 213 private Date startOfMonth(/*Date dateInMonth,*/ Calendar fCalendar) in startOfMonth() 218 int era = fCalendar.get(Calendar.ERA); in startOfMonth() [all …]
|
D | CalendarTestFmwk.java | 20 import com.ibm.icu.util.Calendar; 32 public final static int SUN = Calendar.SUNDAY; 33 public final static int MON = Calendar.MONDAY; 34 public final static int TUE = Calendar.TUESDAY; 35 public final static int WED = Calendar.WEDNESDAY; 36 public final static int THU = Calendar.THURSDAY; 37 public final static int FRI = Calendar.FRIDAY; 38 public final static int SAT = Calendar.SATURDAY; 40 public final static int ERA = Calendar.ERA; 41 public final static int YEAR = Calendar.YEAR; [all …]
|
D | TestCase.java | 15 import com.ibm.icu.util.Calendar; 63 return dowToString(get(Calendar.DAY_OF_WEEK)) + " " + in toString() 64 get(Calendar.YEAR) + "/" + (get(Calendar.MONTH)+1) + "/" + in toString() 65 get(Calendar.DATE); in toString() 98 set(Calendar.ERA, era); in TestCase() 99 set(Calendar.YEAR, year); in TestCase() 100 set(Calendar.MONTH, month - 1); in TestCase() 101 set(Calendar.DATE, day); in TestCase() 102 set(Calendar.DAY_OF_WEEK, dayOfWeek); in TestCase() 103 set(Calendar.HOUR, hour); in TestCase() [all …]
|
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/calendar/ |
D | CompatibilityTest.java | 27 import ohos.global.icu.util.Calendar; 52 java.util.Calendar jdkCal = java.util.Calendar.getInstance(jdkGMT); in TestGregorianChangeover() 54 jdkCal.set(1582, Calendar.OCTOBER, 15); in TestGregorianChangeover() 105 int y = cal.get(Calendar.YEAR), mon = cal.get(Calendar.MONTH)+1-Calendar.JANUARY, in TestGregorianChangeover() 106 dom = cal.get(Calendar.DATE), dow = cal.get(Calendar.DAY_OF_WEEK); in TestGregorianChangeover() 180 2440588, 1970, Calendar.JANUARY, 1, 1969, Calendar.DECEMBER, 19, in TestMapping() 181 2415080, 1900, Calendar.MARCH, 1, 1900, Calendar.FEBRUARY, 17, in TestMapping() 182 2451604, 2000, Calendar.FEBRUARY, 29, 2000, Calendar.FEBRUARY, 16, in TestMapping() 183 2452269, 2001, Calendar.DECEMBER, 25, 2001, Calendar.DECEMBER, 12, in TestMapping() 184 2416526, 1904, Calendar.FEBRUARY, 15, 1904, Calendar.FEBRUARY, 2, in TestMapping() [all …]
|
D | CalendarRegressionTest.java | 33 import ohos.global.icu.util.Calendar; 94 if (cal.get(Calendar.HOUR) != 5) { in Test4031502() 97 cal.get(Calendar.DST_OFFSET) / (60*60*1000.0) + "; ZONE_OFFSET = " + in Test4031502() 98 cal.get(Calendar.ZONE_OFFSET) / (60*60*1000.0) + "; getRawOffset() = " + in Test4031502() 100 "; HOUR = " + cal.get(Calendar.HOUR)); in Test4031502() 103 if (cal.get(Calendar.HOUR) != 5) { in Test4031502() 106 cal.get(Calendar.DST_OFFSET) / (60*60*1000.0) + "; ZONE_OFFSET = " + in Test4031502() 107 … cal.get(Calendar.ZONE_OFFSET) / (60*60*1000.0) + "; getRawOffset() = " + in Test4031502() 109 "; HOUR = " + cal.get(Calendar.HOUR)); in Test4031502() 113 cal.get(Calendar.HOUR); in Test4031502() [all …]
|
D | IBMCalendarTest.java | 29 import ohos.global.icu.util.Calendar; 67 2000, Calendar.MARCH, 17, 23, 0, 0, // Fri 23:00 in TestWeekend() 68 2000, Calendar.MARCH, 18, 0, -1, 0, // Fri 23:59:59.999 in TestWeekend() 69 2000, Calendar.MARCH, 18, 0, 0, 1, // Sat 00:00 in TestWeekend() 70 2000, Calendar.MARCH, 18, 15, 0, 1, // Sat 15:00 in TestWeekend() 71 2000, Calendar.MARCH, 19, 23, 0, 1, // Sun 23:00 in TestWeekend() 72 2000, Calendar.MARCH, 20, 0, -1, 1, // Sun 23:59:59.999 in TestWeekend() 73 2000, Calendar.MARCH, 20, 0, 0, 0, // Mon 00:00 in TestWeekend() 74 2000, Calendar.MARCH, 20, 8, 0, 0, // Mon 08:00 in TestWeekend() 77 2000, Calendar.MARCH, 15, 23, 0, 0, // Wed 23:00 in TestWeekend() [all …]
|
D | DangiTest.java | 18 import ohos.global.icu.util.Calendar; 78 Calendar cal = Calendar.getInstance(new ULocale("ko_KR@calendar=dangi")); in TestMapping() 83 Calendar grego = Calendar.getInstance(); in TestMapping() 89 int y = cal.get(Calendar.EXTENDED_YEAR); in TestMapping() 90 int m = cal.get(Calendar.MONTH) + 1; // 0-based -> 1-based in TestMapping() 91 int L = cal.get(Calendar.IS_LEAP_MONTH); in TestMapping() 92 int d = cal.get(Calendar.DAY_OF_MONTH); in TestMapping() 116 cal.set(Calendar.EXTENDED_YEAR, cyear); in TestMapping() 117 cal.set(Calendar.MONTH, cmonth - 1); in TestMapping() 118 cal.set(Calendar.IS_LEAP_MONTH, cisleapmonth); in TestMapping() [all …]
|
D | ChineseTest.java | 21 import ohos.global.icu.util.Calendar; 103 Calendar grego = Calendar.getInstance(); in TestMapping() 109 int y = cal.get(Calendar.EXTENDED_YEAR); in TestMapping() 110 int m = cal.get(Calendar.MONTH)+1; // 0-based -> 1-based in TestMapping() 111 int L = cal.get(Calendar.IS_LEAP_MONTH); in TestMapping() 112 int d = cal.get(Calendar.DAY_OF_MONTH); in TestMapping() 137 cal.set(Calendar.EXTENDED_YEAR, cyear); in TestMapping() 138 cal.set(Calendar.MONTH, cmonth-1); in TestMapping() 139 cal.set(Calendar.IS_LEAP_MONTH, cisleapmonth); in TestMapping() 140 cal.set(Calendar.DAY_OF_MONTH, cdayofmonth); in TestMapping() [all …]
|
D | HolidayTest.java | 21 import ohos.global.icu.util.Calendar; 48 private Calendar cal; 148 final Calendar c = Calendar.getInstance(TimeZone.GMT_ZONE); // Temporary copy in exerciseHoliday() 150 final Date fStartOfMonth = startOfMonth((Calendar)c.clone()); in exerciseHoliday() 165 c.roll(Calendar.DATE, false); in exerciseHoliday() 169 c.roll(Calendar.DATE, true); in exerciseHoliday() 170 c.add(Calendar.MONTH, 1); in exerciseHoliday() 172 c.add(Calendar.SECOND, -1); in exerciseHoliday() 216 private Date startOfMonth(/*Date dateInMonth,*/ Calendar fCalendar) in startOfMonth() 221 int era = fCalendar.get(Calendar.ERA); in startOfMonth() [all …]
|
D | CalendarTestFmwk.java | 21 import ohos.global.icu.util.Calendar; 35 public final static int SUN = Calendar.SUNDAY; 36 public final static int MON = Calendar.MONDAY; 37 public final static int TUE = Calendar.TUESDAY; 38 public final static int WED = Calendar.WEDNESDAY; 39 public final static int THU = Calendar.THURSDAY; 40 public final static int FRI = Calendar.FRIDAY; 41 public final static int SAT = Calendar.SATURDAY; 43 public final static int ERA = Calendar.ERA; 44 public final static int YEAR = Calendar.YEAR; [all …]
|
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ |
D | DebugUtilitiesData.java | 122 com.ibm.icu.util.Calendar.ERA, /* 0 */ 123 com.ibm.icu.util.Calendar.YEAR, /* 1 */ 124 com.ibm.icu.util.Calendar.MONTH, /* 2 */ 125 com.ibm.icu.util.Calendar.WEEK_OF_YEAR, /* 3 */ 126 com.ibm.icu.util.Calendar.WEEK_OF_MONTH, /* 4 */ 127 com.ibm.icu.util.Calendar.DATE, /* 5 */ 128 com.ibm.icu.util.Calendar.DAY_OF_YEAR, /* 6 */ 129 com.ibm.icu.util.Calendar.DAY_OF_WEEK, /* 7 */ 130 com.ibm.icu.util.Calendar.DAY_OF_WEEK_IN_MONTH, /* 8 */ 131 com.ibm.icu.util.Calendar.AM_PM, /* 9 */ [all …]
|
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/util/ |
D | DebugUtilitiesData.java | 126 ohos.global.icu.util.Calendar.ERA, /* 0 */ 127 ohos.global.icu.util.Calendar.YEAR, /* 1 */ 128 ohos.global.icu.util.Calendar.MONTH, /* 2 */ 129 ohos.global.icu.util.Calendar.WEEK_OF_YEAR, /* 3 */ 130 ohos.global.icu.util.Calendar.WEEK_OF_MONTH, /* 4 */ 131 ohos.global.icu.util.Calendar.DATE, /* 5 */ 132 ohos.global.icu.util.Calendar.DAY_OF_YEAR, /* 6 */ 133 ohos.global.icu.util.Calendar.DAY_OF_WEEK, /* 7 */ 134 ohos.global.icu.util.Calendar.DAY_OF_WEEK_IN_MONTH, /* 8 */ 135 ohos.global.icu.util.Calendar.AM_PM, /* 9 */ [all …]
|
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/data/ |
D | HolidayBundle_en_US.java | 12 import java.util.Calendar; 23 … new SimpleHoliday(Calendar.JANUARY, 15, Calendar.MONDAY, "Martin Luther King Day", 1986), 25 … new SimpleHoliday(Calendar.FEBRUARY, 15, Calendar.MONDAY, "Presidents' Day", 1976), 26 …new SimpleHoliday(Calendar.FEBRUARY, 22, "Washington's Birthday", 1776, … 31 … new SimpleHoliday(Calendar.MAY, 8, Calendar.SUNDAY, "Mother's Day", 1914), 33 … new SimpleHoliday(Calendar.MAY, 31, -Calendar.MONDAY, "Memorial Day", 1971), 34 …new SimpleHoliday(Calendar.MAY, 30, "Memorial Day", 1868, … 36 … new SimpleHoliday(Calendar.JUNE, 15, Calendar.SUNDAY, "Father's Day", 1956), 37 … new SimpleHoliday(Calendar.JULY, 4, "Independence Day", 1776), 38 … new SimpleHoliday(Calendar.SEPTEMBER, 1, Calendar.MONDAY, "Labor Day", 1894), [all …]
|
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/data/ |
D | HolidayBundle_en_US.java | 13 import java.util.Calendar; 27 … new SimpleHoliday(Calendar.JANUARY, 15, Calendar.MONDAY, "Martin Luther King Day", 1986), 29 … new SimpleHoliday(Calendar.FEBRUARY, 15, Calendar.MONDAY, "Presidents' Day", 1976), 30 …new SimpleHoliday(Calendar.FEBRUARY, 22, "Washington's Birthday", 1776, … 35 … new SimpleHoliday(Calendar.MAY, 8, Calendar.SUNDAY, "Mother's Day", 1914), 37 … new SimpleHoliday(Calendar.MAY, 31, -Calendar.MONDAY, "Memorial Day", 1971), 38 …new SimpleHoliday(Calendar.MAY, 30, "Memorial Day", 1868, … 40 … new SimpleHoliday(Calendar.JUNE, 15, Calendar.SUNDAY, "Father's Day", 1956), 41 … new SimpleHoliday(Calendar.JULY, 4, "Independence Day", 1776), 42 … new SimpleHoliday(Calendar.SEPTEMBER, 1, Calendar.MONDAY, "Labor Day", 1894), [all …]
|
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/timezone/ |
D | TimeZoneRegressionTest.java | 34 import ohos.global.icu.util.Calendar; 75 z.setStartRule(Calendar.FEBRUARY, 1, Calendar.SUNDAY, 0); in Test4073215() 76 z.setEndRule(Calendar.MARCH, -1, Calendar.SUNDAY, 0); in Test4073215() 79 Calendar tempcal = Calendar.getInstance(); in Test4073215() 82 tempcal.set(1997, Calendar.JANUARY, 31); in Test4073215() 88 tempcal.set(1997, Calendar.MARCH, 1); in Test4073215() 94 tempcal.set(1997, Calendar.MARCH, 31); in Test4073215() 114 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (2*60*60*1000)); in Test4084933() 116 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (2*60*60*1000)-1); in Test4084933() 119 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (1*60*60*1000)); in Test4084933() [all …]
|
D | TimeZoneBoundaryTest.java | 21 import ohos.global.icu.util.Calendar; 207 java.util.Calendar cal = java.util.Calendar.getInstance(); in showDate() 209 return "" + (cal.get(Calendar.YEAR) - 1900) + "/" + in showDate() 210 showNN(cal.get(Calendar.MONTH) + 1) + "/" + in showDate() 211 showNN(cal.get(Calendar.DAY_OF_MONTH)) + " " + in showDate() 212 showNN(cal.get(Calendar.HOUR_OF_DAY)) + ":" in showDate() 213 + showNN(cal.get(Calendar.MINUTE)) + " \"" + d + "\" = " + in showDate() 226 java.util.Calendar cal = java.util.Calendar.getInstance(); in showDate() 228 return "" + (cal.get(Calendar.YEAR) - 1900) + "/" + in showDate() 229 showNN(cal.get(Calendar.MONTH) + 1) + "/" + in showDate() [all …]
|
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/ |
D | TimeZoneRegressionTest.java | 33 import com.ibm.icu.util.Calendar; 72 z.setStartRule(Calendar.FEBRUARY, 1, Calendar.SUNDAY, 0); in Test4073215() 73 z.setEndRule(Calendar.MARCH, -1, Calendar.SUNDAY, 0); in Test4073215() 76 Calendar tempcal = Calendar.getInstance(); in Test4073215() 79 tempcal.set(1997, Calendar.JANUARY, 31); in Test4073215() 85 tempcal.set(1997, Calendar.MARCH, 1); in Test4073215() 91 tempcal.set(1997, Calendar.MARCH, 31); in Test4073215() 111 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (2*60*60*1000)); in Test4084933() 113 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (2*60*60*1000)-1); in Test4084933() 116 1997, Calendar.OCTOBER, 26, Calendar.SUNDAY, (1*60*60*1000)); in Test4084933() [all …]
|
D | TimeZoneBoundaryTest.java | 20 import com.ibm.icu.util.Calendar; 204 java.util.Calendar cal = java.util.Calendar.getInstance(); in showDate() 206 return "" + (cal.get(Calendar.YEAR) - 1900) + "/" + in showDate() 207 showNN(cal.get(Calendar.MONTH) + 1) + "/" + in showDate() 208 showNN(cal.get(Calendar.DAY_OF_MONTH)) + " " + in showDate() 209 showNN(cal.get(Calendar.HOUR_OF_DAY)) + ":" in showDate() 210 + showNN(cal.get(Calendar.MINUTE)) + " \"" + d + "\" = " + in showDate() 223 java.util.Calendar cal = java.util.Calendar.getInstance(); in showDate() 225 return "" + (cal.get(Calendar.YEAR) - 1900) + "/" + in showDate() 226 showNN(cal.get(Calendar.MONTH) + 1) + "/" + in showDate() [all …]
|
/third_party/icu/docs/userguide/datetime/calendar/ |
D | examples.md | 3 title: Calendar Examples 12 # Calendar Examples 23 ## Calendar for Default Time Zone 25 These C++, C , and Java examples get a Calendar based on the default time zone 38 gc->set(2000, Calendar::FEBRUARY, 26); 39 gc->set(Calendar::HOUR_OF_DAY, 23); 40 gc->set(Calendar::MINUTE, 0); 41 gc->set(Calendar::SECOND, 0); 42 gc->set(Calendar::MILLISECOND, 0); 48 gc->get(Calendar::YEAR, status), [all …]
|
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/ |
D | DateIntervalFormat.java | 32 import ohos.global.icu.util.Calendar; 447 private Calendar fFromCalendar; 448 private Calendar fToCalendar; 509 fFromCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat() 510 fToCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat() 521 fFromCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat() 522 fToCalendar = (Calendar) fDateFormat.getCalendar().clone(); in DateIntervalFormat() 701 other.fFromCalendar = (Calendar) fFromCalendar.clone(); in clone() 702 other.fToCalendar = (Calendar) fToCalendar.clone(); in clone() 799 public String getPatterns(Calendar fromCalendar, in getPatterns() [all …]
|