void CalendarRegressionTest::test4061476()
{
    UErrorCode status = U_ZERO_ERROR;
    SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("ddMMMyy"), Locale::getUK(),status);
    Calendar *cal = Calendar::createInstance(TimeZone::createTimeZone("GMT"),
                                    Locale::getUK(),status);
    if(U_FAILURE(status)) {
      dataerrln("Error creating Calendar: %s", u_errorName(status));
      delete cal;
      delete fmt;
      return;
    }
    fmt->adoptCalendar(cal);
    // try {
            UDate date = fmt->parse("29MAY97", status);
            failure(status, "fmt->parse");
            cal->setTime(date, status);
            failure(status, "cal->setTime");
     //   }
    //catch (Exception e) {;}
    cal->set(UCAL_HOUR_OF_DAY, 13);
    logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status));
    cal->add(UCAL_HOUR_OF_DAY, 6,status);
    logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status));
    if (cal->get(UCAL_HOUR_OF_DAY, status) != 19)
        errln(UnicodeString("Fail: Want 19 Got ") + cal->get(UCAL_HOUR_OF_DAY, status));

    delete fmt;
}
void CalendarRegressionTest::test4061476()
{
    UErrorCode status = U_ZERO_ERROR;
    SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("ddMMMyy"), Locale::getUK(),status);
    Calendar *cal = Calendar::createInstance(TimeZone::createTimeZone("GMT"),
                                    Locale::getUK(),status);
    if(U_FAILURE(status)) {
      dataerrln("Error creating Calendar: %s", u_errorName(status));
      delete cal;
      delete fmt;
      return;
    }
    fmt->adoptCalendar(cal);
     
            UDate date = fmt->parse("29MAY97", status);
            failure(status, "fmt->parse");
            cal->setTime(date, status);
            failure(status, "cal->setTime");
      
     
    cal->set(UCAL_HOUR_OF_DAY, 13);
    logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status));
    cal->add(UCAL_HOUR_OF_DAY, 6,status);
    logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status));
    if (cal->get(UCAL_HOUR_OF_DAY, status) != 19)
        errln(UnicodeString("Fail: Want 19 Got ") + cal->get(UCAL_HOUR_OF_DAY, status));

    delete fmt;
}