This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Just to be nitpicky (but it might help you to see the issue from another angle), if your resolution is in *days*, determining the number of *hours* (or smaller time unit) provides more information than what is useful.
For instance, if it's 8:00 am, should 9:00 am the day after tomorrow evaluate to true or false (i.e., 49 hours)? [ June 22, 2005: Message edited by: Steve Morrow ]
Joined: Apr 18, 2005
So what I want to check is if they are within 2 days of each other.
I could compare year, then month and then day. But this starts getting hairy with the 28(29), 30, 31 day months possibly ?
Or am I missing your point and there's an easier way to do this ?
And what don't I like about it....well I guess its the fact that I want to address the issue in terms of hours ( or as you correctly point out days) and I am being reduced to working with miliseconds. [ June 22, 2005: Message edited by: Alan Morgan ]