NSTimestamp Behaviour

Jeff Dunnett <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hello,

Does anyone know the behaviour of NSTimestamp when a 0 is put in the  
date field.

For example...

The constructor I am using is:

NSTimestamp(int year, int month, int date, int hour, int minute, int  
second, TimeZone tz)

I am passing in:

NSTimestamp(Integer.parseInt(aSelectedYear), aSelectedMonth, 0, 0, 0,  
0, TimeZone.getTimeZone("GMT-4"))

The documentation says that date should be between 1 and 31.  Still  
the constructor doesn't throw an exception when I pass a 0 into the  
date field.  It seems to be decrementing the value of  
aSelectedMonth.  For instance if aSelectedMonth = 6 (June) the value  
of aSelectedMonth becomes 5 (May).  If aSelectedMonth = 1 (January)  
it wraps around to become 12 (December).  Does anyone know if this is  
supposed to happen when you enter 0 into date?

Regards,
Jeff

_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.