Life is full of choices. Sometimes you make the good ones, and sometimes you have to kill all the witnesses.
Jd Wells wrote:I cant seem to see why it returns the wrong zodiac.. maybe I just need a second set of eyes.. lol
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Jd Wells wrote:Thanks Winston... That was very helpful!
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:Alternatively: Create a utility class (Calendars?) that includes a compareByDate(Calendar c1, Calendar c2) method. That might actually be better, since an instance method won't be symmetrical.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Thank you for noticing.Dave Tolls wrote:Crossposted on the Java Forum:
http://www.java-forums.org/new-java/92897-date-compasrisons-not-working.html
Dave Tolls wrote:For each Zodiac you format the Date (and do nothing with the returned String) and then get the Calendar again, from the same SDF.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:and the simple fact is, I have no idea what happens when you create a Date from a format like "MM/dd".
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Dave Tolls wrote:And consequently compDate, startDate, endDate and the Calendar in 'format' are all referencing the same Calendar object.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Dave Tolls wrote:It's not (IMO) that Calendar is arcane (though that doesn't help) it's the (ab)use of SDF to do this job.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
His brain is the size of a cherry pit! About the size of this ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|