void CalendarRegressionTest::test4086724()
{
    UErrorCode status = U_ZERO_ERROR;
    SimpleDateFormat *date;
    TimeZone *saveZone = TimeZone::createDefault();
    Locale saveLocale = Locale::getDefault();
    //try {
    Locale::setDefault(Locale::getUK(),status);
    TimeZone *newZone = TimeZone::createTimeZone("GMT");
    TimeZone::setDefault(*newZone);
        date = new SimpleDateFormat(UnicodeString("dd MMM yyy (zzzz) 'is in week' ww"),status);
        Calendar *cal = Calendar::createInstance(status);
        if(U_FAILURE(status)) {
          dataerrln("Error creating Calendar: %s", u_errorName(status));
          delete cal;
          delete newZone;
          delete date;
          return;
        }
        cal->set(1997,UCAL_SEPTEMBER,30);
        UDate now = cal->getTime(status);
        UnicodeString temp;
        FieldPosition pos(FieldPosition::DONT_CARE);
        logln(date->format(now, temp, pos));
        cal->set(1997,UCAL_JANUARY,1);
        now=cal->getTime(status);
        logln(date->format(now,temp, pos));
        cal->set(1997,UCAL_JANUARY,8);
        now=cal->getTime(status);
        logln(date->format(now,temp, pos));
        cal->set(1996,UCAL_DECEMBER,31);
        now=cal->getTime(status);
        logln(date->format(now,temp, pos));
    //}
    //finally {
        Locale::setDefault(saveLocale,status);
        TimeZone::setDefault(*saveZone);
    //}
    logln("*** THE RESULTS OF THIS TEST MUST BE VERIFIED MANUALLY ***");

delete newZone;
delete cal;
delete date;
delete saveZone;
}
void CalendarRegressionTest::test4086724()
{
    UErrorCode status = U_ZERO_ERROR;
    SimpleDateFormat *date;
    TimeZone *saveZone = TimeZone::createDefault();
    Locale saveLocale = Locale::getDefault();
     
    Locale::setDefault(Locale::getUK(),status);
    TimeZone *newZone = TimeZone::createTimeZone("GMT");
    TimeZone::setDefault(*newZone);
        date = new SimpleDateFormat(UnicodeString("dd MMM yyy (zzzz) 'is in week' ww"),status);
        Calendar *cal = Calendar::createInstance(status);
        if(U_FAILURE(status)) {
          dataerrln("Error creating Calendar: %s", u_errorName(status));
          delete cal;
          delete newZone;
          delete date;
          return;
        }
        cal->set(1997,UCAL_SEPTEMBER,30);
        UDate now = cal->getTime(status);
        UnicodeString temp;
        FieldPosition pos(FieldPosition::DONT_CARE);
        logln(date->format(now, temp, pos));
        cal->set(1997,UCAL_JANUARY,1);
        now=cal->getTime(status);
        logln(date->format(now,temp, pos));
        cal->set(1997,UCAL_JANUARY,8);
        now=cal->getTime(status);
        logln(date->format(now,temp, pos));
        cal->set(1996,UCAL_DECEMBER,31);
        now=cal->getTime(status);
        logln(date->format(now,temp, pos));
     
     
        Locale::setDefault(saveLocale,status);
        TimeZone::setDefault(*saveZone);
     
    logln("*** THE RESULTS OF THIS TEST MUST BE VERIFIED MANUALLY ***");

delete newZone;
delete cal;
delete date;
delete saveZone;
}