Re: NSTimeStamp
Re: NSTimeStamp
- Subject: Re: NSTimeStamp
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 17 Feb 2003 17:21:48 -0600
At 10:33 PM 2/13/2003 -0800, Dan wrote:
What's a good replacement for the deprecated method
gregorianUnitsSinceTimestamp? I need to calculate the number of years,
months, days, hours, minutes, and seconds between 2 dates.
You need to use standard Java classes, instead of anything in the Apple
frameworks. Alas, the world Java calendar/date handling is a confusing one,
that I can't say I completely understand. In part just becuase handling
calendar dates in locale-appropriate and timezone-appropriate ways can be
confusing, and the Java classes try to do this. In part, becuase the Java
classes just plain are more confusing then they ought to be, partially for
legacy purposes, partially through poor design.
So I can't say I completely understand, but at least it's a Java issue you
can find help on from anyone that speaks Java, you aren't limited to the WO
world. The way you convert between an NSTimestamp and the Java JDK classes
for dates is covered in the NSTimestamp documentation.
But how you do what you need to do with the standard Java classes? I'm not
really sure, can't quite figure it out looking at the documentation. It
looks like no such method exists, you have to roll your own from existing
methods. What a pain.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.