Jd Wells wrote:I cant seem to see why it returns the wrong zodiac.. maybe I just need a second set of eyes.. lol
Jd Wells wrote:Thanks Winston... That was very helpful!
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.
Thank you for noticing.
Dave Tolls wrote:Crossposted on the Java Forum:
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.
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".
Dave Tolls wrote:And consequently compDate, startDate, endDate and the Calendar in 'format' are all referencing the same Calendar object.
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.
I will suppress my every urge. But not this shameless plug:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earthhttps://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter