Re: setNumberOfObjects in an NSArray
Re: setNumberOfObjects in an NSArray
- Subject: Re: setNumberOfObjects in an NSArray
- From: David LeBer <email@hidden>
- Date: Tue, 2 Aug 2005 15:35:52 -0400
On 2-Aug-05, at 3:04 PM, Dev WO wrote:
Hello David,
setting the dateUpdated to be equal to datePosted on creation might
do the trick...
I've got to change a couple other stuf that was relying on a null
dateUpdated, but this shouldn't be a problem and would solved
pretty much everything:)
can I compare dates using == like if (datePosted == dateUpdated)?
If you are trying to test the date objects to see if they are the
same time, that will probably not work (the two dates are probably
*not* the same object) I'm assuming you are using NSTimestamp as the
Attribute type for your dates. It inherits from java.util.data and
gets the following methods:
boolean after(Date when) - Tests if this date is after the specified
date.
boolean before(Date when) - Tests if this date is before the
specified date.
int compareTo(Object o) - Compares this Date to another Object.
boolean equals(Object obj) - Compares two dates for equality.
Be careful, you may wish to test for equality based on a window (ie:
ignore hours, minutes, and seconds so any date today will equal any
other date today) but I'm sure you'll find something useful in those
methods :-)
--
;david
--
David LeBer
Codebase Software Systems
site: http://www.codebase.ca
blog: http://david.codebase.ca
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden