Regarding GWT1.6.

This test:

package com.google.gwt.i18n.client;
import java.util.Date;
import com.google.gwt.junit.client.GWTTestCase;

public class DateTimeFormatTest extends GWTTestCase {
        private String                  pattern = "yyyy'-'MM'-'dd";
        private DateTimeFormat  format  = DateTimeFormat.getFormat(pattern);

        public void testShouldFormatDateToYYYYDashMMDashDD() throws Exception
{
                assertToDate("1999-01-01", 1999, 0, 1);
        }

        @SuppressWarnings("deprecation")
        private void assertToDate(String expected, int YYYY, int MM, int DD)
{
                assertEquals(expected, format.format(new Date(YYYY, MM, DD)));
        }

        @Override
        public String getModuleName() {
                return "com.google.gwt.user.User";
        }
}

fails with :
junit.framework.AssertionFailedError:  expected=1999-01-01
actual=3899-01-01


Am I missing something ?
Why is it displaying 19*2=38, instead of 19, as first two digits in
the year ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to