final int kYear = 0; // offset for dotNetDateTimeTicks[] field
final int kMonth = 1;
final int kDay = 2;
final int kTicks = 3;
final int kIncrement = 4;
GregorianCalendar cal;
long icuDate;
long ticks, millis;
int i;
/* Open a proleptic Gregorian calendar. */
long before0001AD = -1000000 * dayMillis;
utc = new SimpleTimeZone(0, "UTC");
cal = new GregorianCalendar(utc, Locale.ENGLISH);
cal.setGregorianChange(new Date(before0001AD));
for(i = 0; i < dotNetDateTimeTicks.length; i += kIncrement) {
/* Test conversion from .Net/Universal time to ICU time. */
millis = UniversalTimeScale.toLong(dotNetDateTimeTicks[i + kTicks], UniversalTimeScale.ICU4C_TIME);
cal.clear();
cal.set((int)dotNetDateTimeTicks[i + kYear],
(int)dotNetDateTimeTicks[i + kMonth] - 1, /* Java & ICU use January = month 0. */
(int)dotNetDateTimeTicks[i + kDay]);
icuDate = cal.getTimeInMillis();
if(millis != icuDate) {
/* Print days not millis. */
errln("UniversalTimeScale.toLong(ticks[" + i + "], ICU4C)=" +
(millis/dayMillis) + " != " + (icuDate/dayMillis) +
"=ucal_getMillis(" + dotNetDateTimeTicks[i + kYear] +